aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-objfile.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-objfile.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-objfile.exp15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp
index 4de20c5..7dd094c 100644
--- a/gdb/testsuite/gdb.python/py-objfile.exp
+++ b/gdb/testsuite/gdb.python/py-objfile.exp
@@ -46,7 +46,7 @@ gdb_test "python print (objfile.username)" "${testfile}" \
"Get objfile user name"
gdb_test "python print (gdb.lookup_objfile (\"${testfile}\").filename)" \
- "${testfile}"
+ "${testfile}" "print lookup_objfile filename"
gdb_test "python print (gdb.lookup_objfile (\"junk\"))" \
"Objfile not found\\.\r\n${python_error_text}"
@@ -56,7 +56,7 @@ if [string compare $binfile_build_id ""] {
gdb_test "python print (objfile.build_id)" "$binfile_build_id" \
"Get objfile build id"
gdb_test "python print (gdb.lookup_objfile (\"$binfile_build_id\", by_build_id=True).filename)" \
- "${testfile}"
+ "${testfile}" "print lookup_objfile filename by build-id"
} else {
unsupported "build-id is not supported by the compiler"
}
@@ -64,9 +64,11 @@ if [string compare $binfile_build_id ""] {
# Other lookup_objfile_by_build_id tests we can do, even if compiler doesn't
# support them.
gdb_test "python print (gdb.lookup_objfile (\"foo\", by_build_id=True))" \
- "Not a valid build id\\.\r\n${python_error_text}"
+ "Not a valid build id\\.\r\n${python_error_text}" \
+ "print invalid file lookup_objfile by build-id"
gdb_test "python print (gdb.lookup_objfile (\"1234abcdef\", by_build_id=True))" \
- "Objfile not found\\.\r\n${python_error_text}"
+ "Objfile not found\\.\r\n${python_error_text}" \
+ "print invalid file lookup_objfile by build-id 2"
gdb_test "python print (objfile.progspace)" "<gdb\.Progspace object at .*>" \
"Get objfile program space"
@@ -104,7 +106,7 @@ if ![runto_main] {
return 0
}
-gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \
+gdb_py_test_silent_cmd "python objfile = gdb.s()\[0\]" \
"Get no-debug objfile file" 1
gdb_test "python print (objfile.owner)" "None" \
@@ -131,7 +133,8 @@ gdb_test "p main" "= {int \\(\\)} $hex <main>" \
# Separate debug files are not findable.
if { [get_python_valueof "sep_objfile.build_id" "None"] != "None" } {
gdb_test "python print (gdb.lookup_objfile (sep_objfile.build_id, by_build_id=True))" \
- "Objfile not found\\.\r\n${python_error_text}"
+ "Objfile not found\\.\r\n${python_error_text}" \
+ "print lookup_objfile of separate debug file"
}
# An objfile that was a symlink to a differently named file is still