Commit 4c27ba27c5dd810fdcfbe82e3998a174a6e793f2
1 parent
ba91cd80
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
Showing
1 changed file
with
22 additions
and
6 deletions
monitor.c
| ... | ... | @@ -350,10 +350,17 @@ static void memory_dump(int count, int format, int wsize, |
| 350 | 350 | int flags; |
| 351 | 351 | flags = 0; |
| 352 | 352 | #ifdef TARGET_I386 |
| 353 | - /* we use the current CS size */ | |
| 354 | - if (!(cpu_single_env->segs[R_CS].flags & DESC_B_MASK)) | |
| 353 | + if (wsize == 2) { | |
| 355 | 354 | flags = 1; |
| 356 | -#endif | |
| 355 | + } else if (wsize == 4) { | |
| 356 | + flags = 0; | |
| 357 | + } else { | |
| 358 | + /* as default we use the current CS size */ | |
| 359 | + flags = 0; | |
| 360 | + if (!(cpu_single_env->segs[R_CS].flags & DESC_B_MASK)) | |
| 361 | + flags = 1; | |
| 362 | + } | |
| 363 | +#endif | |
| 357 | 364 | monitor_disas(addr, count, is_physical, flags); |
| 358 | 365 | return; |
| 359 | 366 | } |
| ... | ... | @@ -516,6 +523,8 @@ static term_cmd_t info_cmds[] = { |
| 516 | 523 | "", "show the cpu registers" }, |
| 517 | 524 | { "history", "", do_info_history, |
| 518 | 525 | "", "show the command line history", }, |
| 526 | + { "pic", "", pic_info, | |
| 527 | + "", "show i8259 (PIC) state", }, | |
| 519 | 528 | { NULL, NULL, }, |
| 520 | 529 | }; |
| 521 | 530 | |
| ... | ... | @@ -1047,16 +1056,23 @@ static void term_handle_command(const char *cmdline) |
| 1047 | 1056 | term_printf("invalid char in format: '%c'\n", *p); |
| 1048 | 1057 | goto fail; |
| 1049 | 1058 | } |
| 1050 | - if (size < 0) | |
| 1051 | - size = default_fmt_size; | |
| 1052 | 1059 | if (format < 0) |
| 1053 | 1060 | format = default_fmt_format; |
| 1061 | + if (format != 'i') { | |
| 1062 | + /* for 'i', not specifying a size gives -1 as size */ | |
| 1063 | + if (size < 0) | |
| 1064 | + size = default_fmt_size; | |
| 1065 | + } | |
| 1054 | 1066 | default_fmt_size = size; |
| 1055 | 1067 | default_fmt_format = format; |
| 1056 | 1068 | } else { |
| 1057 | 1069 | count = 1; |
| 1058 | 1070 | format = default_fmt_format; |
| 1059 | - size = default_fmt_size; | |
| 1071 | + if (format != 'i') { | |
| 1072 | + size = default_fmt_size; | |
| 1073 | + } else { | |
| 1074 | + size = -1; | |
| 1075 | + } | |
| 1060 | 1076 | } |
| 1061 | 1077 | if (nb_args + 3 > MAX_ARGS) |
| 1062 | 1078 | goto error_args; | ... | ... |