diff options
Diffstat (limited to 'gdb/testsuite/gdb.ada/exec_changed.exp')
-rw-r--r-- | gdb/testsuite/gdb.ada/exec_changed.exp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index 4a3792b..583ee0a 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -24,22 +24,17 @@ if [target_info exists use_gdb_stub] { return } -set testdir "exec_changed" -file mkdir ${objdir}/${subdir}/${testdir} +standard_ada_testfile first # Build the first test program (note that cygwin needs the $EXEEXT). -set testfile1 "${testdir}/first" -set srcfile1 ${srcdir}/${subdir}/${testfile1}.adb -set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT - -if {[gdb_compile_ada "${srcfile1}" "${binfile1}" executable {debug}] != ""} { +if {[gdb_compile_ada "${srcfile}" "${binfile}$EXEEXT" executable {debug}] != ""} { return -1 } # Build the second test program set testfile2 "${testdir}/second" set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb -set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT +set binfile2 [standard_output_file ${testfile2}$EXEEXT] if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} { return -1 @@ -47,16 +42,15 @@ if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} { # Start with a fresh gdb. -set testfile "${testdir}/common" -set binfile ${objdir}/${subdir}/${testfile}$EXEEXT +set common_binfile [standard_output_file ${testdir}/common$EXEEXT] gdb_start gdb_reinitialize_dir $srcdir/$subdir # Load the first executable. -gdb_test "shell mv ${binfile1} ${binfile}" ".*" "" -gdb_load ${binfile} +gdb_test "shell mv ${binfile} ${common_binfile}" ".*" "" +gdb_load ${common_binfile} # Start the program, we should land in the program main procedure if { [gdb_start_cmd] < 0 } { @@ -72,10 +66,10 @@ gdb_test "" \ # second executable into its place. Ensure that the new # executable is at least a second newer than the old. -gdb_test "shell mv ${binfile} ${binfile1}" ".*" "" -gdb_test "shell mv ${binfile2} ${binfile}" ".*" "" +gdb_test "shell mv ${common_binfile} ${binfile}" ".*" "" +gdb_test "shell mv ${binfile2} ${common_binfile}" ".*" "" gdb_test "shell sleep 1" ".*" "" -gdb_test "shell touch ${binfile}" ".*" "" +gdb_test "shell touch ${common_binfile}" ".*" "" # Start the program a second time, GDB should land in procedure Second # this time. |