aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/reread.exp
diff options
context:
space:
mode:
authorJanis Johnson <janis@sourceware.org>2011-05-05 16:29:58 +0000
committerJanis Johnson <janis@sourceware.org>2011-05-05 16:29:58 +0000
commit56744f0ad5014d8f09764e77f30c50d125c3dc5a (patch)
treeb5f8a510adda134c2e0d9635be64eef5b4458559 /gdb/testsuite/gdb.base/reread.exp
parent4c67c7981493811f6766ffb9b8a33cf9a8bb0956 (diff)
downloadbinutils-56744f0ad5014d8f09764e77f30c50d125c3dc5a.zip
binutils-56744f0ad5014d8f09764e77f30c50d125c3dc5a.tar.gz
binutils-56744f0ad5014d8f09764e77f30c50d125c3dc5a.tar.bz2
* lib/gdb.exp (exec_target_file, exec_symbol_file,
gdb_rename_execfile, gdb_touch_execfile): New. * gdb.base/reread.exp: Use new procs to handle multiple exec files.
Diffstat (limited to 'gdb/testsuite/gdb.base/reread.exp')
-rw-r--r--gdb/testsuite/gdb.base/reread.exp16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp
index 78d1126..291de54 100644
--- a/gdb/testsuite/gdb.base/reread.exp
+++ b/gdb/testsuite/gdb.base/reread.exp
@@ -53,7 +53,7 @@ gdb_reinitialize_dir $srcdir/$subdir
# Load the first executable.
-gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
+gdb_rename_execfile ${binfile1} ${binfile}
gdb_load ${binfile}
# Set a breakpoint at foo
@@ -82,10 +82,10 @@ gdb_expect {
# 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_rename_execfile ${binfile} ${binfile1}
+gdb_rename_execfile ${binfile2} ${binfile}
gdb_test "shell sleep 1" ".*" ""
-gdb_test "shell touch ${binfile}" ".*" ""
+gdb_touch_execfile ${binfile}
# Run a second time; GDB should detect that the executable has changed
# and reset the breakpoints correctly.
@@ -120,8 +120,8 @@ if [is_remote target] {
} else {
# Put the older executable back in place.
- gdb_test "shell mv ${binfile} ${binfile2}" ".*" ""
- gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
+ gdb_rename_execfile ${binfile} ${binfile2}
+ gdb_rename_execfile ${binfile1} ${binfile}
# Restart GDB entirely.
gdb_start
@@ -154,8 +154,8 @@ if [is_remote target] {
# Now move the newer executable into place, and re-run. GDB
# should still notice that the executable file has changed,
# and still re-set the breakpoint appropriately.
- gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
- gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+ gdb_rename_execfile ${binfile} ${binfile1}
+ gdb_rename_execfile ${binfile2} ${binfile}
gdb_run_cmd
gdb_expect {
-re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" {