diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-25 18:05:08 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-25 18:05:08 +0000 |
commit | 4c27ba27c5dd810fdcfbe82e3998a174a6e793f2 (patch) | |
tree | 17b307e267eea0de1ccbad5b9354d5a0c9c29652 /monitor.c | |
parent | ba91cd80d5a267c3a25770efc4590bf807c56376 (diff) |
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
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -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; |