summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break.exp
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2002-01-07 19:21:27 +0000
committerJeff Law <law@redhat.com>2002-01-07 19:21:27 +0000
commit4dad25f58b831a5b7e520da7f4333ae8e0ea768e (patch)
tree2b83b9c13ddfc0338515ee42442e0987121eca3c /gdb/testsuite/gdb.base/break.exp
parent91ece06e7d3667b5ee74ce14100a5998b9a434c9 (diff)
downloadgdb-4dad25f58b831a5b7e520da7f4333ae8e0ea768e.tar.gz
* gdb.base/break.c (multi_line_if_conditional): New function.
(multi_ilne_while_conditional): Likewise. * gdb.base/break.exp: Verify that a breakpoint on a multi-line IF or WHILE condition puts the breakpoint at the start of the condition.
Diffstat (limited to 'gdb/testsuite/gdb.base/break.exp')
-rw-r--r--gdb/testsuite/gdb.base/break.exp16
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 798e0c24fd6..166f097eb57 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -122,6 +122,18 @@ gdb_test "break $srcfile:85" \
#
+# Test putting a break at the start of a multi-line if conditional.
+# Verify the breakpoint was put at the start of the conditional.
+#
+gdb_test "break multi_line_if_conditional" \
+ "Breakpoint.*at.* file .*$srcfile, line 109\\." \
+ "breakpoint at start of multi line if conditional"
+
+gdb_test "break multi_line_while_conditional" \
+ "Breakpoint.*at.* file .*$srcfile, line 124\\." \
+ "breakpoint at start of multi line while conditional"
+
+#
# check to see what breakpoints are set
#
if [target_info exists gdb_stub] {
@@ -141,7 +153,9 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85" \
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:109.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:124" \
"breakpoint info"