Discussion:
[inferior events] minor patch from trunk
Tom Tromey
2010-12-14 21:37:58 UTC
Permalink
This fix comes from the trunk.

Without this we will crash when calling gdb.selected_thread before any
threads exist.

Ok to push?

Tom

@@ -206,6 +294,9 @@ find_thread_object (ptid_t ptid)
PyObject *inf_obj;

pid = PIDGET (ptid);
+ if (pid == 0)
+ return NULL;
+
inf_obj = find_inferior_object (pid);

if (inf_obj)
sami wagiaalla
2010-12-15 15:48:44 UTC
Permalink
Post by Tom Tromey
This fix comes from the trunk.
Without this we will crash when calling gdb.selected_thread before any
threads exist.
Ok to push?
Yes.
Post by Tom Tromey
Tom
@@ -206,6 +294,9 @@ find_thread_object (ptid_t ptid)
PyObject *inf_obj;
pid = PIDGET (ptid);
+ if (pid == 0)
+ return NULL;
+
inf_obj = find_inferior_object (pid);
if (inf_obj)
Loading...