diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 18:08:01 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-09 18:08:01 +0000 |
commit | 7fe48483cd90401de2477733ce65037ee0ed0906 (patch) | |
tree | 8c3fe5c0ffda5348071a085fa82f1b5dffd9f163 /monitor.c | |
parent | 8e3a9fd28059821f819295fe9178435990141924 (diff) |
monitor fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1110 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -101,6 +101,15 @@ void term_printf(const char *fmt, ...) va_end(ap); } +static int monitor_fprintf(FILE *stream, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + term_vprintf(fmt, ap); + va_end(ap); + return 0; +} + static int compare_cmd(const char *name, const char *list) { const char *p, *pstart; @@ -206,9 +215,11 @@ static void do_info_block(void) static void do_info_registers(void) { #ifdef TARGET_I386 - cpu_dump_state(cpu_single_env, stdout, X86_DUMP_FPU | X86_DUMP_CCOP); + cpu_dump_state(cpu_single_env, stdout, monitor_fprintf, + X86_DUMP_FPU | X86_DUMP_CCOP); #else - cpu_dump_state(cpu_single_env, stdout, 0); + cpu_dump_state(cpu_single_env, stdout, monitor_fprintf, + 0); #endif } @@ -1852,6 +1863,15 @@ void readline_find_completion(const char *cmdline) completion_index = strlen(str); bdrv_iterate(block_completion_it, (void *)str); break; + case 's': + /* XXX: more generic ? */ + if (!strcmp(cmd->name, "info")) { + completion_index = strlen(str); + for(cmd = info_cmds; cmd->name != NULL; cmd++) { + cmd_completion(str, cmd->name); + } + } + break; default: break; } |