aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPhil Muldoon <pmuldoon@redhat.com>2010-11-23 13:33:23 +0000
committerPhil Muldoon <pmuldoon@redhat.com>2010-11-23 13:33:23 +0000
commitea976c60e229b7d4ccfbf4a735a09c407f104a20 (patch)
treea3644ba2e08af2aede1c2bae21b8a0f82052b6bf /gdb/testsuite
parent5be229c0d8db1f0c18bc627ce31b61adac0428cd (diff)
downloadgdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.zip
gdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.tar.gz
gdb-ea976c60e229b7d4ccfbf4a735a09c407f104a20.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.python/python.exp5
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index f8c282b..f6c6b43 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+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.
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp
index dd9175a..e6080d1 100644
--- a/gdb/testsuite/gdb.python/python.exp
+++ b/gdb/testsuite/gdb.python/python.exp
@@ -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}