aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-progspace.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-progspace.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-progspace.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-progspace.exp b/gdb/testsuite/gdb.python/py-progspace.exp
index 638b279..f0dc208 100644
--- a/gdb/testsuite/gdb.python/py-progspace.exp
+++ b/gdb/testsuite/gdb.python/py-progspace.exp
@@ -68,6 +68,13 @@ if ![is_address_zero_readable] {
gdb_test "python print (gdb.current_progspace ().block_for_pc (0))" "None"
}
+gdb_test "python print(gdb.current_progspace().objfile_for_address(${pc_val}).username)" \
+ ".*py-progspace" \
+ "objfile for pc"
+gdb_test "python print(gdb.current_progspace().objfile_for_address(0))" \
+ "None" \
+ "no objfile for 0"
+
# With a single inferior, progspace.objfiles () and gdb.objfiles () should
# be identical.
gdb_test "python print (progspace.objfiles () == gdb.objfiles ())" "True"