> 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
 22:25:29  up 3 days 21:26,  2 users,  load average: 1.44, 1.34, 0.97
This commit is contained in:
tracer-ysyx 2024-01-11 22:25:29 +08:00 committed by xinyangli
parent 6dde11822d
commit 9674f3b0c2

View file

@ -52,7 +52,7 @@ static struct CMDTable {
NULL, 0},
{"c", "Continue the execution of the program", cmd_c, NULL, 0},
{"q", "Exit NEMU", cmd_q, NULL, 0},
{"x", "Examine content of physical memory address", cmd_x, NULL, 0},
{"x", "Examine content of physical memory address", cmd_x, NULL, 0},
{"si", "Execute next [n] program line", cmd_si, NULL, 0},
{"info", "Print information of registers or watchpoints", cmd_info,
cmd_info_table, ARRLEN(cmd_info_table)},
@ -88,6 +88,11 @@ static char *rl_gets() {
* uint.
*/
static word_t parse_uint(const char *arg, bool *success) {
if (arg == NULL) {
puts("Invalid uint argument.");
*success = false;
return 0;
}
int base = 10;
int token_length = strnlen(arg, 34);
if (token_length > 2) {