diff --git a/gdbstub/gdbstub_sys.c b/gdbstub/gdbstub_sys.c index f98a7abb..bd966b29 100644 --- a/gdbstub/gdbstub_sys.c +++ b/gdbstub/gdbstub_sys.c @@ -415,12 +415,16 @@ void dbg_start(void) if (server_socket >= 0) { printf("GDB server started on port %hu.\n", port); - if (queue_create()) + if (queue_create()) { fprintf(stderr, "could not create gdb stub internal queues\n"); + Config.GdbServer = 0; + } else start_thread(); } - else + else { fprintf(stderr, "could not start GDB server\n"); + Config.GdbServer = 0; + } } }