public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [inferior events] minor patch from trunk
@ 2010-12-14 21:38 Tom Tromey
  2010-12-15 15:48 ` sami wagiaalla
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2010-12-14 21:38 UTC (permalink / raw)
  To: Project Archer

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [inferior events] minor patch from trunk
  2010-12-14 21:38 [inferior events] minor patch from trunk Tom Tromey
@ 2010-12-15 15:48 ` sami wagiaalla
  0 siblings, 0 replies; 2+ messages in thread
From: sami wagiaalla @ 2010-12-15 15:48 UTC (permalink / raw)
  To: archer

On 12/14/2010 04:37 PM, Tom Tromey wrote:
> This fix comes from the trunk.
>
> Without this we will crash when calling gdb.selected_thread before any
> threads exist.
>
> Ok to push?
>

Yes.

> 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-15 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 21:38 [inferior events] minor patch from trunk Tom Tromey
2010-12-15 15:48 ` sami wagiaalla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).