summaryrefslogtreecommitdiffstats
path: root/gdbstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index 6c0db4f..0e51280 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -41,6 +41,12 @@
#include "qemu/sockets.h"
#include "sysemu/kvm.h"
+#ifdef CONFIG_USER_ONLY
+#define GDB_ATTACHED "0"
+#else
+#define GDB_ATTACHED "1"
+#endif
+
static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr,
uint8_t *buf, int len, bool is_write)
{
@@ -1195,6 +1201,10 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)
put_packet_binary(s, buf, len + 1);
break;
}
+ if (is_query_packet(p, "Attached", ':')) {
+ put_packet(s, GDB_ATTACHED);
+ break;
+ }
/* Unrecognised 'q' command. */
goto unknown_command;
OpenPOWER on IntegriCloud