Support setting thread names (MS-Windows)
authorРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 10 Aug 2016 18:22:45 +0000 (19:22 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 10 Aug 2016 18:22:45 +0000 (19:22 +0100)
commit24cdb46e9f0a694b4fbc11085e094857f08c0419
treebcd2b884c7e5923934e0bec0fd26f97ab2aecca6
parentf571390111e28717935ea1b6edd1afc902c5c61c
Support setting thread names (MS-Windows)

This is done by catching an exception number 0x406d1388 (it has no
documented name, though MSDN dubs it "MS_VC_EXCEPTION" in one code
example), which is thrown by the program.  The exception record
contains an ID of a thread and a name to give it.

This requires rolling back some changes in handle_exception(), which
now again returns more than two distinct values.  The new
HANDLE_EXCEPTION_IGNORED value means that gdb should just continue,
without returning the thread ID up the stack (which would result in
further handling of the exception, which is not what we want).

gdb/ChangeLog:
2016-08-10  Руслан Ижбулатов  <lrn1986@gmail.com>
    Pedro Alves  <palves@redhat.com>

* windows-nat.c (MS_VC_EXCEPTION): New define.
(handle_exception_result): New enum.
(windows_delete_thread): Free the thread's name.
(handle_exception): Handle MS_VC_EXCEPTION.
(get_windows_debug_event): Handle HANDLE_EXCEPTION_IGNORED.
(windows_thread_name): New function.
(windows_target): Install it as to_thread_name method.
* NEWS: Mention the thread naming support on MS-Windows.
gdb/ChangeLog
gdb/NEWS
gdb/windows-nat.c
This page took 0.038583 seconds and 4 git commands to generate.