aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-09 18:08:01 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-09 18:08:01 +0000
commit7fe48483cd90401de2477733ce65037ee0ed0906 (patch)
tree8c3fe5c0ffda5348071a085fa82f1b5dffd9f163 /monitor.c
parent8e3a9fd28059821f819295fe9178435990141924 (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.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 27e2619d1c..de47684bc6 100644
--- a/monitor.c
+++ b/monitor.c
@@ -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;
}