aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-symbol.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-symbol.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-symbol.exp11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp
index 55cdebe..2029c28 100644
--- a/gdb/testsuite/gdb.python/py-symbol.exp
+++ b/gdb/testsuite/gdb.python/py-symbol.exp
@@ -44,7 +44,7 @@ if {!$readnow_p} {
}
# Restart so we don't have expanded symtabs after the previous test.
-clean_restart ${binfile}
+clean_restart ${::testfile}
# Test looking up a global symbol before we runto_main as this is the
# point where we don't have a current frame, and we don't want to
@@ -100,7 +100,6 @@ gdb_test_multiple $cmd "print value of rr" {
fail $gdb_test_name
}
}
-
gdb_test "python print (gdb.lookup_static_symbol ('rr').needs_frame)" \
"False" \
@@ -215,8 +214,10 @@ gdb_test "python print (t\[0\].symtab)" "${py_symbol_c}" "get symtab"
# C++ tests
# Recompile binary.
lappend opts c++
-if {[prepare_for_testing "failed to prepare" "${binfile}-cxx" \
- [list $srcfile $srcfile2] $opts]} {
+set testfile $testfile-cxx
+set binfile [standard_output_file $testfile]
+if { [prepare_for_testing "failed to prepare" $testfile \
+ [list $srcfile $srcfile2] $opts] } {
return -1
}
@@ -252,7 +253,7 @@ gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "t
# Test is_valid when the objfile is unloaded. This must be the last
# test as it unloads the object file in GDB.
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
}