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

Here's another fix from trunk.

gdb.selected_thread is defined to return None when there is no current
thread.  On the branch it errors.

Ok to push?

Tom

diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 64f0a21..3e76519 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -173,13 +173,6 @@ gdbpy_selected_thread (PyObject *self, PyObject *args)
 {
   PyObject *thread_obj;
 
-  if (inferior_ptid.pid == 0)
-    {
-      PyErr_SetString (PyExc_RuntimeError,
-                       _("No thread is currently selected."));
-      return NULL;
-    }
-
   thread_obj = (PyObject *) find_thread_object (inferior_ptid);
   if (thread_obj)
     {

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

* Re: [inferior events] another fix from trunk
  2010-12-14 21:39 [inferior events] another fix from trunk Tom Tromey
@ 2010-12-15 15:52 ` sami wagiaalla
  2010-12-15 16:07   ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: sami wagiaalla @ 2010-12-15 15:52 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Project Archer

On 12/14/2010 04:39 PM, Tom Tromey wrote:
> Here's another fix from trunk.
>
> gdb.selected_thread is defined to return None when there is no current
> thread.  On the branch it errors.
>

Does it do that though ? IIRC it just crash when there was no current 
thread.

> Ok to push?
>

If no crash then yes.

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

* Re: [inferior events] another fix from trunk
  2010-12-15 15:52 ` sami wagiaalla
@ 2010-12-15 16:07   ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2010-12-15 16:07 UTC (permalink / raw)
  To: sami wagiaalla; +Cc: Project Archer

>> gdb.selected_thread is defined to return None when there is no current
>> thread.  On the branch it errors.

Sami> Does it do that though ? IIRC it just crash when there was no current
Sami> thread.

Yeah, it does.  find_thread_object returns NULL if there is no thread.

Tom

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 21:39 [inferior events] another fix from trunk Tom Tromey
2010-12-15 15:52 ` sami wagiaalla
2010-12-15 16:07   ` Tom Tromey

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