diff options
author | Tom Tromey <tromey@adacore.com> | 2022-04-12 14:25:44 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-14 12:12:34 -0600 |
commit | 44ac251ad202da57e134f160b6831a56a82a8cf0 (patch) | |
tree | 148a8ed6b4e99309e17e9761b30873e5e64b1c0d /gdb/nat/windows-nat.h | |
parent | b17c7ab3808f5b781537514b28695dafaa29cb28 (diff) | |
download | binutils-44ac251ad202da57e134f160b6831a56a82a8cf0.zip binutils-44ac251ad202da57e134f160b6831a56a82a8cf0.tar.gz binutils-44ac251ad202da57e134f160b6831a56a82a8cf0.tar.bz2 |
Share handle_ms_vc_exception with gdbserver
Currently, gdb's native Windows target implements the exception-based
approach for setting thread names, but gdbserver does not. This patch
moves handle_ms_vc_exception to the shared nat/windows-nat.c code, as
preparation for adding this support to gdbserver.
Diffstat (limited to 'gdb/nat/windows-nat.h')
-rw-r--r-- | gdb/nat/windows-nat.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gdb/nat/windows-nat.h b/gdb/nat/windows-nat.h index 7f76ba0..522e267 100644 --- a/gdb/nat/windows-nat.h +++ b/gdb/nat/windows-nat.h @@ -92,7 +92,7 @@ struct windows_thread_info adjustments if the registers are read multiple times. */ bool pc_adjusted = false; - /* The name of the thread, allocated by xmalloc. */ + /* The name of the thread. */ gdb::unique_xmalloc_ptr<char> name; }; @@ -213,16 +213,6 @@ struct windows_process_info void handle_unload_dll (); - /* Handle MS_VC_EXCEPTION when processing a stop. MS_VC_EXCEPTION is - somewhat undocumented but is used to tell the debugger the name of - a thread. - - Return true if the exception was handled; return false otherwise. - - This function must be supplied by the embedding application. */ - - bool handle_ms_vc_exception (const EXCEPTION_RECORD *rec); - /* When EXCEPTION_ACCESS_VIOLATION is processed, we give the embedding application a chance to change it to be considered "unhandled". This function must be supplied by the embedding application. If it @@ -256,6 +246,14 @@ struct windows_process_info private: + /* Handle MS_VC_EXCEPTION when processing a stop. MS_VC_EXCEPTION is + somewhat undocumented but is used to tell the debugger the name of + a thread. + + Return true if the exception was handled; return false otherwise. */ + + bool handle_ms_vc_exception (const EXCEPTION_RECORD *rec); + /* Iterate over all DLLs currently mapped by our inferior, looking for a DLL which is loaded at LOAD_ADDR. If found, add the DLL to our list of solibs; otherwise do nothing. LOAD_ADDR NULL means add all |