diff options
Diffstat (limited to 'gdb/python/py-threadevent.c')
-rw-r--r-- | gdb/python/py-threadevent.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gdb/python/py-threadevent.c b/gdb/python/py-threadevent.c index 13af1c8..ea62540 100644 --- a/gdb/python/py-threadevent.c +++ b/gdb/python/py-threadevent.c @@ -25,24 +25,15 @@ gdbpy_ref<> py_get_event_thread (ptid_t ptid) { - gdbpy_ref<> pythread; - if (non_stop) { thread_info *thread = find_thread_ptid (ptid); if (thread != nullptr) - pythread = thread_to_thread_object (thread); - } - else - pythread = gdbpy_ref<>::new_reference (Py_None); - - if (pythread == nullptr) - { + return thread_to_thread_object (thread); PyErr_SetString (PyExc_RuntimeError, "Could not find event thread"); return NULL; } - - return pythread; + return gdbpy_ref<>::new_reference (Py_None); } gdbpy_ref<> |