aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-22 01:48:01 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-22 01:48:01 +0000
commitcfc3475a8df6d03dfbffa813d7d919eda409c85b (patch)
treee674005120c69bba0ae2402fd05aec1c923a4f49 /monitor.c
parent7bcc17dc020d49f0baf25010f3d2be41ebfe238f (diff)
Allow gdbstub to connect over any serial device.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2448 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/monitor.c b/monitor.c
index cd0663e937..43ebe01f3e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -423,14 +423,14 @@ static void do_cont(void)
}
#ifdef CONFIG_GDBSTUB
-static void do_gdbserver(int has_port, int port)
+static void do_gdbserver(const char *port)
{
- if (!has_port)
+ if (!port)
port = DEFAULT_GDBSTUB_PORT;
- if (gdbserver_start_port(port) < 0) {
- qemu_printf("Could not open gdbserver socket on port %d\n", port);
+ if (gdbserver_start(port) < 0) {
+ qemu_printf("Could not open gdbserver socket on port '%s'\n", port);
} else {
- qemu_printf("Waiting gdb connection on port %d\n", port);
+ qemu_printf("Waiting gdb connection on port '%s'\n", port);
}
}
#endif
@@ -1216,7 +1216,7 @@ static term_cmd_t term_cmds[] = {
{ "c|cont", "", do_cont,
"", "resume emulation", },
#ifdef CONFIG_GDBSTUB
- { "gdbserver", "i?", do_gdbserver,
+ { "gdbserver", "s?", do_gdbserver,
"[port]", "start gdbserver session (default port=1234)", },
#endif
{ "x", "/l", do_memory_dump,