mirror of https://github.com/xemu-project/xemu.git
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
This commit is contained in:
parent
ba91cd80d5
commit
4c27ba27c5
28
monitor.c
28
monitor.c
|
@ -350,10 +350,17 @@ static void memory_dump(int count, int format, int wsize,
|
|||
int flags;
|
||||
flags = 0;
|
||||
#ifdef TARGET_I386
|
||||
/* we use the current CS size */
|
||||
if (!(cpu_single_env->segs[R_CS].flags & DESC_B_MASK))
|
||||
if (wsize == 2) {
|
||||
flags = 1;
|
||||
#endif
|
||||
} 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))
|
||||
flags = 1;
|
||||
}
|
||||
#endif
|
||||
monitor_disas(addr, count, is_physical, flags);
|
||||
return;
|
||||
}
|
||||
|
@ -516,6 +523,8 @@ static term_cmd_t info_cmds[] = {
|
|||
"", "show the cpu registers" },
|
||||
{ "history", "", do_info_history,
|
||||
"", "show the command line history", },
|
||||
{ "pic", "", pic_info,
|
||||
"", "show i8259 (PIC) state", },
|
||||
{ NULL, NULL, },
|
||||
};
|
||||
|
||||
|
@ -1047,16 +1056,23 @@ static void term_handle_command(const char *cmdline)
|
|||
term_printf("invalid char in format: '%c'\n", *p);
|
||||
goto fail;
|
||||
}
|
||||
if (size < 0)
|
||||
size = default_fmt_size;
|
||||
if (format < 0)
|
||||
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_format = format;
|
||||
} else {
|
||||
count = 1;
|
||||
format = default_fmt_format;
|
||||
size = default_fmt_size;
|
||||
if (format != 'i') {
|
||||
size = default_fmt_size;
|
||||
} else {
|
||||
size = -1;
|
||||
}
|
||||
}
|
||||
if (nb_args + 3 > MAX_ARGS)
|
||||
goto error_args;
|
||||
|
|
Loading…
Reference in New Issue