PR python/12212
* python/py-inferior.c (find_thread_object): Check if PIDGET
returns 0.
2010-11-23 Phil Muldoon <pmuldoon@redhat.com>
PR python/12212
* gdb.python/python.exp: Check that selected_thread raises an
error when no inferior is loaded.
-2010-11-22 Joel Brobecker <brobecker@adacore.com>
+2010-11-23 Phil Muldoon <pmuldoon@redhat.com>
+
+ PR python/12212
+
+ * python/py-inferior.c (find_thread_object): Check if PIDGET
+ returns 0.
+
+010-11-22 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (ada_template_to_fixed_record_type_1): Delete bit_incr.
PyObject *inf_obj;
pid = PIDGET (ptid);
+ if (pid == 0)
+ return NULL;
+
inf_obj = find_inferior_object (pid);
if (inf_obj)
+2010-11-23 Phil Muldoon <pmuldoon@redhat.com>
+
+ PR python/12212
+
+ * gdb.python/python.exp: Check that selected_thread raises an
+ error when no inferior is loaded.
+
2010-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/dw2-stack-boundary.exp: New file.
gdb_test "python print a" ".*aliases -- Aliases of other commands.*" "verify help to uiout"
+# Test PR 12212, using InfThread.selected_thread() when no inferior is
+# loaded.
+gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to aquire thread with no inferior" 1
+gdb_test "python print nothread == None" "True" "Ensure that no threads are returned"
+
# Start with a fresh gdb.
clean_restart ${testfile}