Index: gdb/testsuite/gdb.linespec/linespec.exp |
diff --git a/gdb/testsuite/gdb.linespec/linespec.exp b/gdb/testsuite/gdb.linespec/linespec.exp |
index da5942aed851778daa47b192ad8fbf22c5b99afe..3698ea2215ec2b420d0609afcb54376ac6e2179f 100644 |
--- a/gdb/testsuite/gdb.linespec/linespec.exp |
+++ b/gdb/testsuite/gdb.linespec/linespec.exp |
@@ -15,10 +15,9 @@ |
# Tests of ambiguous linespecs. |
-set testfile linespec |
+standard_testfile lspec.cc |
-set exefile lspec |
-set binfile ${objdir}/${subdir}/${exefile} |
+set exefile $testfile |
set baseone base/one/thefile.cc |
set basetwo base/two/thefile.cc |
@@ -29,8 +28,8 @@ if {[skip_cplus_tests]} { |
} |
if {[prepare_for_testing ${testfile}.exp $exefile \ |
- [list lspec.cc $baseone $basetwo] \ |
- {debug nowarnings}]} { |
+ [list $srcfile $baseone $basetwo] \ |
+ {debug nowarnings c++}]} { |
return -1 |
} |
@@ -44,19 +43,24 @@ if {$l1 != $l2} { |
error "somebody incompatibly modified the source files needed by linespec.exp" |
} |
+gdb_test "break one/thefile.cc:$l1" \ |
+ "Breakpoint $decimal at $hex: file .*thefile.cc, line $l1." \ |
+ "single-location break using dir/file:line" |
+ |
+gdb_test "clear one/thefile.cc:$l1" \ |
+ "Deleted breakpoint $decimal *" \ |
+ "clear breakpoint using dir/file:line" |
+ |
gdb_test "break thefile.cc:$l1" \ |
- "Breakpoint 1 at $hex: thefile.cc:$l1. \[(\]2 locations\[)\]" \ |
+ "Breakpoint $decimal at $hex: thefile.cc:$l1. \[(\]2 locations\[)\]" \ |
"multi-location break using file:line" |
-# We'd like this to work, but it currently does not. |
-# gdb_test "break one/thefile.cc:$l1" |
- |
gdb_test "break dupname" \ |
- "Breakpoint 2 at $hex: dupname. \[(\]2 locations\[)\]" \ |
+ "Breakpoint $decimal at $hex: dupname. \[(\]2 locations\[)\]" \ |
"multi-location break using duplicate function name" |
gdb_test "break dupname:label" \ |
- "Breakpoint 3 at $hex: dupname:label. \[(\]2 locations\[)\]" \ |
+ "Breakpoint $decimal at $hex: dupname:label. \[(\]2 locations\[)\]" \ |
"multi-location break using duplicate function name and label" |
gdb_test_no_output "set breakpoint pending off" \ |