提交 1802f032 编写于 作者: Z Zihao Yu

monitor,cpu-exec: call abort() when return with NEMU_ABORT

* This can let gdb catch the abort signal to observe detail state of
  NEMU, instead of exiting.
上级 b473fcf6
......@@ -2,6 +2,7 @@
#include "monitor/monitor.h"
#include "monitor/watchpoint.h"
#include "monitor/diff-test.h"
#include <stdlib.h>
/* The assembly code of instructions executed is only output to the screen
* when the number of instructions executed is less than this value.
......@@ -89,5 +90,6 @@ void cpu_exec(uint64_t n) {
(nemu_state.halt_ret == 0 ? "\33[1;32mHIT GOOD TRAP" : "\33[1;31mHIT BAD TRAP")),
nemu_state.halt_pc);
monitor_statistic();
if (nemu_state.state == NEMU_ABORT) abort();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册