mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
Have gdb.ThreadExitedEvent inherit from gdb.ThreadEvent
The documentation says that ThreadExitedEvent is derived from ThreadEvent, but the code does not actually implement this. This patch fixes the problem. I propose applying this to gdb 17 as well. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33444 Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
parent
727ee2e293
commit
3a9f5df6ea
2 changed files with 3 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ GDB_PY_DEFINE_EVENT_TYPE (new_thread,
|
|||
GDB_PY_DEFINE_EVENT_TYPE (thread_exited,
|
||||
"ThreadExitedEvent",
|
||||
"GDB thread exited event object",
|
||||
event_object_type);
|
||||
thread_event_object_type);
|
||||
|
||||
GDB_PY_DEFINE_EVENT_TYPE (new_inferior,
|
||||
"NewInferiorEvent",
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ def thread_exited_handler(event):
|
|||
global threadOneExit, threadTwoExit, mainThreadExit
|
||||
print("{}".format(event))
|
||||
assert isinstance(event, gdb.ThreadExitedEvent)
|
||||
# Also check the inheritance.
|
||||
assert isinstance(event, gdb.ThreadEvent)
|
||||
if threadOneExit == "":
|
||||
threadOneExit = "event type: thread-exited. global num: {}".format(
|
||||
event.inferior_thread.global_num
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue