Fix clean_restart <absolute filename> in gdb.arch/amd64*.exp.
Tested on x86_64-linux, with kernel version 6.16.3.
The only unsupported test-case is gdb.arch/amd64-lam.exp, which isn't changed
by this commit.
return
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
return
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
proc_with_prefix check_x87_regs_around_init {} {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
# Get things started.
if {![runto_main]} {
proc_with_prefix check_setting_mxcsr_before_enable {} {
global binfile gdb_prompt
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
proc_with_prefix check_setting_x87_regs_before_enable {} {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
gdb_test "bt" "^#0 +breakpt *\\(\\) \[^\r\n\]*\r\n#1 +0x\[0-9a-f\]+ in func5\[^\r\n\]*\r\n#2 +0x\[0-9a-f\]+ in func4\[^\r\n\]*\r\n#3 +0x\[0-9a-f\]+ in func3\[^\r\n\]*\r\nBacktrace stopped: Cannot access memory at address 0x\[0-9a-f\]+" \
"second backtrace, with error message"
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto breakpt] {
return -1
"\\^done,depth=\"4\"" \
"check mi -stack-info-depth command, second time"
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto breakpt] {
return -1
gdb_test "bt no-filters" "^#0 +$hex in func2 \\(\\)\r\nBacktrace stopped: Cannot access memory at address 0x\[0-9a-f\]+" \
"second backtrace, with error message"
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto breakpt] {
return -1
"\\^done,depth=\"1\"" \
"check mi -stack-info-depth command, second time"
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto breakpt] {
return -1
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .S
-set binfile ${binfile}.o
+set testfile $testfile.o
+set binfile [standard_output_file $testfile]
require is_x86_64_m64_target
return
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test "break *pushrbp" " at 0x1: file .*"
gdb_test "break pushrbp" " at 0x1: file .*"
require is_x86_64_m64_target
}
-if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile $opts]} {
+if {[prepare_for_testing "failed to prepare" ${testfile} $srcfile $opts]} {
return -1
}
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return
proc restart_and_run_infcall_call2 {} {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if { ![runto_main] } {
return -1
}
return -1
}
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if { ![runto_main] } {
return -1
}
gdb_continue_to_end
}
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if { ![runto_main] } {
return -1
}
gdb_continue_to_end
}
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if { ![runto_main] } {
return -1
}
# Load the core file and check the value of the shadow stack pointer.
if {$core_generated} {
- clean_restart $binfile
+ clean_restart $::testfile
with_test_prefix "OS corefile" {
# Read ssp value from saved output of the test program.
return
}
- clean_restart $binfile
+ clean_restart $::testfile
if ![runto $linespec] {
return
gdb_assert { $gcore_generated } "gcore corefile created"
if { $gcore_generated } {
- clean_restart $binfile
+ clean_restart $::testfile
with_test_prefix "gcore corefile" {
check_core_file $gcore_filename $ssp_in_gcore
"continue to SIGSEGV"
}
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if { ![runto_main] } {
return
}
return
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0