aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-inferior.c
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2022-01-05 16:37:28 +0100
committerHannes Domani <ssbssa@yahoo.de>2022-01-05 18:35:20 +0100
commit72df4c816f8a2c6dfb76988ccceee28e28bbaa3d (patch)
tree7c324063d00528fb1d8771be972887adc42c6649 /gdb/python/py-inferior.c
parent63a8c05f09703cb30ca7e87e6bacf569ec6a472d (diff)
downloadgdb-72df4c816f8a2c6dfb76988ccceee28e28bbaa3d.zip
gdb-72df4c816f8a2c6dfb76988ccceee28e28bbaa3d.tar.gz
gdb-72df4c816f8a2c6dfb76988ccceee28e28bbaa3d.tar.bz2
Fix inferior_thread attribute in new_thread event
Commit 72ee03ff58 fixed a use-after-move bug in add_thread_object, but it changed the inferior_thread attribute to contain the inferior instead of the actual thread. This now uses the thread_obj in its new location instead. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28429
Diffstat (limited to 'gdb/python/py-inferior.c')
-rw-r--r--gdb/python/py-inferior.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 6b1443d..45e33f9 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -333,7 +333,8 @@ add_thread_object (struct thread_info *tp)
return;
gdbpy_ref<> event = create_thread_event_object (&new_thread_event_object_type,
- (PyObject *) inf_obj);
+ (PyObject *)
+ entry->thread_obj.get ());
if (event == NULL
|| evpy_emit_event (event.get (), gdb_py_events.new_thread) < 0)
gdbpy_print_stack ();