2010-11-23 Phil Muldoon <pmuldoon@redhat.com>

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.
This commit is contained in:
Phil Muldoon
2010-11-23 13:33:23 +00:00
parent 5be229c0d8
commit ea976c60e2
4 changed files with 23 additions and 1 deletions

View File

@ -130,6 +130,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)