diff --git a/gdbstub.c b/gdbstub.c index 7d470b608e..ef95ac29ba 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2062,9 +2062,11 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) goto unknown_command; } case 'k': +#ifdef CONFIG_USER_ONLY /* Kill the target */ fprintf(stderr, "\nQEMU: Terminated via GDBstub\n"); exit(0); +#endif case 'D': /* Detach packet */ gdb_breakpoint_remove_all();