This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[inferior events] minor patch from trunk
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Tue, 14 Dec 2010 14:37:58 -0700
- Subject: [inferior events] minor patch from trunk
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)