diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-05 20:46:05 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-05 20:46:05 +0000 |
commit | c636bb66cc9043032caf20cb067bf9c818b7d17e (patch) | |
tree | 51cbf84685276b0433ce1548a55fa9bda65ee880 /gdbstub.c | |
parent | 84f2e8ef058f5919f0e896d48edecc4c1282e092 (diff) |
gdbserver fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2393 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'gdbstub.c')
-rw-r--r-- | gdbstub.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1234,4 +1234,18 @@ int gdbserver_start(CharDriverState *chr) qemu_add_vm_stop_handler(gdb_vm_stopped, s); return 0; } + +int gdbserver_start_port(int port) +{ + CharDriverState *chr; + char gdbstub_port_name[128]; + + snprintf(gdbstub_port_name, sizeof(gdbstub_port_name), + "tcp::%d,nowait,nodelay,server", port); + chr = qemu_chr_open(gdbstub_port_name); + if (!chr) + return -EIO; + return gdbserver_start(chr); +} + #endif |