From b080104b8efc2b4783ce75b8e2fad8ea6e619933 Mon Sep 17 00:00:00 2001 From: Sandro Ronco Date: Sun, 21 Aug 2022 15:10:46 +0200 Subject: debuggdbstub.cpp: implement thread alive command. --- src/osd/modules/debugger/debuggdbstub.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/osd/modules/debugger/debuggdbstub.cpp b/src/osd/modules/debugger/debuggdbstub.cpp index 2aecd4bc6a6..485322ecc27 100644 --- a/src/osd/modules/debugger/debuggdbstub.cpp +++ b/src/osd/modules/debugger/debuggdbstub.cpp @@ -495,6 +495,7 @@ public: cmd_reply handle_P(const char *buf); cmd_reply handle_q(const char *buf); cmd_reply handle_s(const char *buf); + cmd_reply handle_T(const char *buf); cmd_reply handle_z(const char *buf); cmd_reply handle_Z(const char *buf); @@ -1100,6 +1101,17 @@ debug_gdbstub::cmd_reply debug_gdbstub::handle_s(const char *buf) return REPLY_NONE; } +//------------------------------------------------------------------------- +// Find out if the thread XX is alive. +debug_gdbstub::cmd_reply debug_gdbstub::handle_T(const char *buf) +{ + if ( is_thread_id_ok(buf) ) + return REPLY_OK; + + // thread is dead + return REPLY_ENN; +} + //------------------------------------------------------------------------- static bool remove_breakpoint(device_debug *debug, uint64_t address, int /*kind*/) { @@ -1270,6 +1282,7 @@ void debug_gdbstub::handle_packet() case 'P': reply = handle_P(buf); break; case 'q': reply = handle_q(buf); break; case 's': reply = handle_s(buf); break; + case 'T': reply = handle_T(buf); break; case 'z': reply = handle_z(buf); break; case 'Z': reply = handle_Z(buf); break; } -- cgit v1.2.3