Tom Tromey
2010-12-14 21:39:09 UTC
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)
{
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)
{