aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 770c2b2..28f122b 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -738,7 +738,7 @@ int main(int argc, char **argv)
CPUState *cpu;
int optind;
const char *r;
- int gdbstub_port = 0;
+ const char *gdbstub = NULL;
char **target_environ, **wrk;
envlist_t *envlist = NULL;
char *trace_file = NULL;
@@ -814,7 +814,7 @@ int main(int argc, char **argv)
exit(1);
}
} else if (!strcmp(r, "g")) {
- gdbstub_port = atoi(argv[optind++]);
+ gdbstub = g_strdup(argv[optind++]);
} else if (!strcmp(r, "r")) {
qemu_uname_release = argv[optind++];
} else if (!strcmp(r, "cpu")) {
@@ -1124,8 +1124,8 @@ int main(int argc, char **argv)
#error unsupported target CPU
#endif
- if (gdbstub_port) {
- gdbserver_start (gdbstub_port);
+ if (gdbstub) {
+ gdbserver_start(gdbstub);
gdb_handlesig(cpu, 0);
}
cpu_loop(env);