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

@ -146,6 +146,11 @@ gdb_test_no_output "python a = gdb.execute('help', to_string=True)" "collect hel
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}