diff options
author | Pedro Alves <pedro@palves.net> | 2023-05-11 12:27:27 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2024-05-10 11:25:59 +0100 |
commit | 3a84bb42a39aefdbb682a65871e6ca4ea622a7b7 (patch) | |
tree | e283bc6b01a4432f4147315bfce1b8dc3717f59e | |
parent | 3f6f23ee4e943f92ed7e52c875076bdaeb70f93b (diff) | |
download | gdb-3a84bb42a39aefdbb682a65871e6ca4ea622a7b7.zip gdb-3a84bb42a39aefdbb682a65871e6ca4ea622a7b7.tar.gz gdb-3a84bb42a39aefdbb682a65871e6ca4ea622a7b7.tar.bz2 |
Windows gdb+gdbserver: Introduce get_last_debug_event_ptid
This will be used in subsequent patches to avoid using
DBG_EXCEPTION_NOT_HANDLED on the wrong thread.
Change-Id: I32915623b5036fb902f9830ce2d6f0b1ccf1f5cf
-rw-r--r-- | gdb/nat/windows-nat.c | 8 | ||||
-rw-r--r-- | gdb/nat/windows-nat.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index a01d7b3..7f8834f 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -666,6 +666,14 @@ windows_process_info::add_all_dlls () /* See nat/windows-nat.h. */ +ptid_t +get_last_debug_event_ptid () +{ + return ptid_t (last_wait_event.dwProcessId, last_wait_event.dwThreadId, 0); +} + +/* See nat/windows-nat.h. */ + BOOL continue_last_debug_event (DWORD continue_status, bool debug_events) { diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index c268a12..70912fd 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -253,6 +253,11 @@ private: extern BOOL continue_last_debug_event (DWORD continue_status, bool debug_events); +/* Return the ptid_t of the thread that the last waited-for event was + for. */ + +extern ptid_t get_last_debug_event_ptid (); + /* A simple wrapper for WaitForDebugEvent that also sets the internal 'last_wait_event' on success. */ |