aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break.exp
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-02-23 19:20:39 +0000
committerMichael Snyder <msnyder@vmware.com>2011-02-23 19:20:39 +0000
commite5a67952d601be63c6f017122971f3c2421825bf (patch)
tree18cdd0d386ef72acd7c1c613ca92fd69dde5540b /gdb/testsuite/gdb.base/break.exp
parentfbcb778d0c464993053911997d95fdce1c2432be (diff)
downloadgdb-e5a67952d601be63c6f017122971f3c2421825bf.zip
gdb-e5a67952d601be63c6f017122971f3c2421825bf.tar.gz
gdb-e5a67952d601be63c6f017122971f3c2421825bf.tar.bz2
2011-02-21 Michael Snyder <msnyder@vmware.com>
* breakpoint.c (breakpoint_1): Change first argument from an int to a char pointer, so that the function now accepts a list of breakpoints rather than just one. Use new function 'number_is_in_list' to implement. (breakpoints_info): Pass char * instead of int to breakpoint_1. (watchpoints_info): Ditto. (tracepoints_info): Ditto. (maintenance_info_breakpoints): Ditto. (_initialize_breakpoint): Update help strings to reflect the fact that these functions can now take more than one argument. * cli/cli-utils.c (number_is_in_list): New function. * cli/cli-utils.h (number_is_in_list): Export. 2011-02-21 Michael Snyder <msnyder@vmware.com> * gdb.texinfo (Set Breaks): Add @dots{} to arguments of info break. (Set Watchpoints): Add @dots{} to argument of info watchpoints. (Listing Tracepoints): Add @dots{} to argument of info tracepoints. 2011-02-21 Michael Snyder <msnyder@vmware.com> * gdb.base/break.exp: Add tests for "info break" with arguments. * gdb.trace/infotrace.exp: Update patterns for error and help. * gdb.base/completion.exp: Update pattern. * gdb.base/ena-dis-br.exp: Update pattern. * gdb.base/help.exp: Update patterns.
Diffstat (limited to 'gdb/testsuite/gdb.base/break.exp')
-rw-r--r--gdb/testsuite/gdb.base/break.exp88
1 files changed, 88 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index dbcc7c0..c02b437 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -150,6 +150,94 @@ gdb_test "info break" \
\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
"breakpoint info"
+#
+# Test info breakpoint with arguments
+#
+
+set see1 0
+set see2 0
+set see3 0
+set see4 0
+set see5 0
+set see6 0
+
+gdb_test_multiple "info break 2 4 6" "info break 2 4 6" {
+ -re "1\[\t \]+breakpoint *keep y\[^\r\n\]*:$main_line\[^\r\n\]*" {
+ set see1 1
+ exp_continue
+ }
+ -re "2\[\t \]+breakpoint *keep y\[^\r\n\]* in marker2 at \[^\r\n\]*" {
+ set see2 1
+ exp_continue
+ }
+ -re "3\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location7\[^\r\n\]*" {
+ set see3 1
+ exp_continue
+ }
+ -re "4\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location1\[^\r\n\]*" {
+ set see4 1
+ exp_continue
+ }
+ -re "5\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location1\[^\r\n\]*" {
+ set see5 1
+ exp_continue
+ }
+ -re "6\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location2\[^\r\n\]*" {
+ set see6 1
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ if { !$see1 && $see2 && !$see3 && $see4 && !$see5 && $see6 } then {
+ pass "info break 2 4 6"
+ } else {
+ fail "info break 2 4 6"
+ }
+ }
+}
+
+set see1 0
+set see2 0
+set see3 0
+set see4 0
+set see5 0
+set see6 0
+
+gdb_test_multiple "info break 3-5" "info break 3-5" {
+ -re "1\[\t \]+breakpoint *keep y.* in main at .*:$main_line\[^\r\n\]*" {
+ set see1 1
+ exp_continue
+ }
+ -re "2\[\t \]+breakpoint *keep y\[^\r\n\]* in marker2 at \[^\r\n\]*" {
+ set see2 1
+ exp_continue
+ }
+ -re "3\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location7\[^\r\n\]*" {
+ set see3 1
+ exp_continue
+ }
+ -re "4\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location1\[^\r\n\]*" {
+ set see4 1
+ exp_continue
+ }
+ -re "5\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location1\[^\r\n\]*" {
+ set see5 1
+ exp_continue
+ }
+ -re "6\[\t \]+breakpoint *keep y\[^\r\n\]*$bp_location2\[^\r\n\]*" {
+ set see6 1
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ if { !$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6 } then {
+ pass "info break 3-5"
+ } else {
+ fail "info break 3-5"
+ }
+ }
+}
+
+gdb_test "print !$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6" "" ""
+
# FIXME: The rest of this test doesn't work with anything that can't
# handle arguments.
# Huh? There doesn't *appear* to be anything that passes arguments