From 4770b4ce97dea17e9aeef1d5842cd1f5a805fc07 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Thu, 11 Jan 2024 17:36:00 +0800 Subject: [PATCH] fix: failed at quit --- nemu/flake.nix | 1 + nemu/src/monitor/sdb/sdb.c | 1 + 2 files changed, 2 insertions(+) diff --git a/nemu/flake.nix b/nemu/flake.nix index 3ecac03..95ec4cb 100644 --- a/nemu/flake.nix +++ b/nemu/flake.nix @@ -19,6 +19,7 @@ packages = [ clang-tools rnix-lsp + bear gdb jre diff --git a/nemu/src/monitor/sdb/sdb.c b/nemu/src/monitor/sdb/sdb.c index 725bce8..b2f7341 100644 --- a/nemu/src/monitor/sdb/sdb.c +++ b/nemu/src/monitor/sdb/sdb.c @@ -49,6 +49,7 @@ static int cmd_c(char *args) { static int cmd_q(char *args) { + nemu_state.state = NEMU_QUIT; return -1; }