提交 4c27ba27 编写于 作者: B bellard

added 'info pic' - added 16/32 bit x86 instruction dump


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@750 c046a42c-6fe2-441c-8c8c-71466251a162
上级 ba91cd80
...@@ -350,9 +350,16 @@ static void memory_dump(int count, int format, int wsize, ...@@ -350,9 +350,16 @@ static void memory_dump(int count, int format, int wsize,
int flags; int flags;
flags = 0; flags = 0;
#ifdef TARGET_I386 #ifdef TARGET_I386
/* we use the current CS size */ if (wsize == 2) {
flags = 1;
} else if (wsize == 4) {
flags = 0;
} else {
/* as default we use the current CS size */
flags = 0;
if (!(cpu_single_env->segs[R_CS].flags & DESC_B_MASK)) if (!(cpu_single_env->segs[R_CS].flags & DESC_B_MASK))
flags = 1; flags = 1;
}
#endif #endif
monitor_disas(addr, count, is_physical, flags); monitor_disas(addr, count, is_physical, flags);
return; return;
...@@ -516,6 +523,8 @@ static term_cmd_t info_cmds[] = { ...@@ -516,6 +523,8 @@ static term_cmd_t info_cmds[] = {
"", "show the cpu registers" }, "", "show the cpu registers" },
{ "history", "", do_info_history, { "history", "", do_info_history,
"", "show the command line history", }, "", "show the command line history", },
{ "pic", "", pic_info,
"", "show i8259 (PIC) state", },
{ NULL, NULL, }, { NULL, NULL, },
}; };
...@@ -1047,16 +1056,23 @@ static void term_handle_command(const char *cmdline) ...@@ -1047,16 +1056,23 @@ static void term_handle_command(const char *cmdline)
term_printf("invalid char in format: '%c'\n", *p); term_printf("invalid char in format: '%c'\n", *p);
goto fail; goto fail;
} }
if (size < 0)
size = default_fmt_size;
if (format < 0) if (format < 0)
format = default_fmt_format; format = default_fmt_format;
if (format != 'i') {
/* for 'i', not specifying a size gives -1 as size */
if (size < 0)
size = default_fmt_size;
}
default_fmt_size = size; default_fmt_size = size;
default_fmt_format = format; default_fmt_format = format;
} else { } else {
count = 1; count = 1;
format = default_fmt_format; format = default_fmt_format;
if (format != 'i') {
size = default_fmt_size; size = default_fmt_size;
} else {
size = -1;
}
} }
if (nb_args + 3 > MAX_ARGS) if (nb_args + 3 > MAX_ARGS)
goto error_args; goto error_args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册