> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux 17:50:33 up 3 days 16:51, 2 users, load average: 1.93, 0.94, 0.97
This commit is contained in:
parent
b606028fc0
commit
58445dc816
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <cpu/cpu.h>
|
#include <cpu/cpu.h>
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.h>
|
#include <readline/history.h>
|
||||||
|
#include <getopt.h>
|
||||||
#include "sdb.h"
|
#include "sdb.h"
|
||||||
|
|
||||||
static int is_batch_mode = false;
|
static int is_batch_mode = false;
|
||||||
|
@ -53,6 +54,11 @@ static int cmd_q(char *args) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int cmd_si(char *args) {
|
||||||
|
printf("%s", args);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int cmd_help(char *args);
|
static int cmd_help(char *args);
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -63,6 +69,7 @@ static struct {
|
||||||
{ "help", "Display information about all supported commands", cmd_help },
|
{ "help", "Display information about all supported commands", cmd_help },
|
||||||
{ "c", "Continue the execution of the program", cmd_c },
|
{ "c", "Continue the execution of the program", cmd_c },
|
||||||
{ "q", "Exit NEMU", cmd_q },
|
{ "q", "Exit NEMU", cmd_q },
|
||||||
|
{ "si", "Single step [n] step", cmd_si },
|
||||||
|
|
||||||
/* TODO: Add more commands */
|
/* TODO: Add more commands */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue