Index: gdb/testsuite/gdb.dwarf2/fission-reread.exp |
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp |
similarity index 56% |
copy from gdb/testsuite/gdb.dwarf2/watch-notconst.exp |
copy to gdb/testsuite/gdb.dwarf2/fission-reread.exp |
index 58e1d0dd2460a8af3e40bf64b03d4f768b0b8a16..9efc530816c38d588d09bc0d218b075f494a4103 100644 |
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp |
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp |
@@ -1,4 +1,4 @@ |
-# Copyright 2010-2012 Free Software Foundation, Inc. |
+# Copyright 2012 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -12,28 +12,33 @@ |
# |
# You should have received a copy of the GNU General Public License |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
-load_lib dwarf.exp |
-set test "watch-notconst" |
+load_lib dwarf.exp |
# This test can only be run on targets which support DWARF-2 and use gas. |
if ![dwarf2_support] { |
return 0 |
} |
-# This test can only be run on x86 targets. |
-if { ![is_x86_like_target] } { |
- return 0 |
-} |
+set basename "fission-reread" |
+ |
+standard_testfile .S |
-if { [prepare_for_testing "${test}.exp" "${test}" \ |
- {watch-notconst.c watch-notconst2.S} {nodebug}] } { |
+# IWBN to use prepare_for_testing here, but we need to set debug-file-directory |
+# before we load the binary. |
+ |
+if { [build_executable "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } { |
return -1 |
} |
-if { ![runto f] } { |
- perror "Could not run to breakpoint `f'." |
- continue |
-} |
+gdb_exit |
+gdb_start |
+gdb_reinitialize_dir $srcdir/$subdir |
+# Set debug-file-directory so we find the dwo file. |
+gdb_test_no_output "set debug-file-directory $subdir" |
+gdb_load [standard_output_file $testfile] |
+ |
+gdb_test "break main" "Breakpoint.*at.*" |
-gdb_test "watch x" ".*\[Ww\]atchpoint 2: x" "watch x" |
+# If we get this far gdb didn't crash, nor did an error occur. |
+pass $testfile |