diff options
-rw-r--r-- | gdbstub.c | 7 | ||||
-rw-r--r-- | include/exec/gdbstub.h | 2 | ||||
-rw-r--r-- | vl.c | 2 |
3 files changed, 11 insertions, 0 deletions
@@ -2052,6 +2052,13 @@ int gdbserver_start(const char *device) return 0; } +void gdbserver_cleanup(void) +{ + if (gdbserver_state) { + put_packet(gdbserver_state, "W00"); + } +} + static void register_types(void) { type_register_static(&char_gdb_type_info); diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 9aa7756d92..2e8a4b83b9 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -103,6 +103,8 @@ int gdbserver_start(int); int gdbserver_start(const char *port); #endif +void gdbserver_cleanup(void); + /** * gdb_has_xml: * This is an ugly hack to cope with both new and old gdb. @@ -4733,6 +4733,8 @@ int main(int argc, char **argv, char **envp) main_loop(); + gdbserver_cleanup(); + /* No more vcpu or device emulation activity beyond this point */ vm_shutdown(); |