diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/break.exp | 88 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/ena-dis-br.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/help.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/infotrace.exp | 4 |
6 files changed, 107 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9cc5fb0..1855f7a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,12 @@ -2011-02-22 Michael Snyder <msnyder@vmware.com> +2011-02-23 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. + +2011-02-23 Michael Snyder <msnyder@vmware.com> * gdb.base/memattr.exp: New test. * gdb.base/memattr.c: Test load for memattr.exp. 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 diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 83be384..1ec542d 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -352,7 +352,7 @@ gdb_expect { -re "^help info watchpoints $"\ { send_gdb "\n" gdb_expect { - -re "Status of watchpoints, .*\r\n.*$gdb_prompt $"\ + -re "Status of specified watchpoints.*\r\n.*$gdb_prompt $"\ { pass "complete help info wat" } -re ".*$gdb_prompt $" { fail "complete help info wat"} timeout {fail "(timeout) complete help info wat"} diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 9dd078c..46713b9 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -154,7 +154,7 @@ gdb_test "continue" \ "continue to auto-deleted break marker3" gdb_test "info break $bp" \ - ".*No breakpoint or watchpoint number.*" \ + ".*No breakpoint or watchpoint matching.*" \ "info auto-deleted break marker3" # Verify that we can set a breakpoint and manually disable it (we've diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index 749aee7..be0d783 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -238,7 +238,9 @@ gdb_test "help info all-registers" "List of all registers and their contents, fo # test help info args gdb_test "help info args" "Argument variables of current stack frame\." "help info args" # test help info breakpoints -gdb_test "help info breakpoints" "Status of user-settable breakpoints, or breakpoint number NUMBER\..*\[\r\n\]+breakpoint set\." "help info breakpoints" +gdb_test "help info breakpoints" \ + "Status of specified breakpoints .all user-settable breakpoints if no argument.*\[\r\n\]+breakpoint set\." \ + "help info breakpoints" # test help info catch gdb_test "help info catch" "Exceptions that can be caught in the current stack frame\." "help info catch" # test help info copying @@ -290,7 +292,9 @@ gdb_test "help info variables" "All global and static variable names, or those m # test help info warranty gdb_test "help info warranty" "Various kinds of warranty you do not have\." "help info warranty" # test help info watchpoints -gdb_test "help info watchpoints" "Status of watchpoints, or watchpoint number NUMBER\." "help info watchpoints" +gdb_test "help info watchpoints" \ + "Status of specified watchpoints .all watchpoints if no argument.\." \ + "help info watchpoints" # test help inspect gdb_test "help inspect" "Same as \"print\" command, except that if you are running in the epoch\[\r\n\]+environment, the value is printed in its own window\." "help inspect" # test help jump diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp index b167089..491cbf9 100644 --- a/gdb/testsuite/gdb.trace/infotrace.exp +++ b/gdb/testsuite/gdb.trace/infotrace.exp @@ -73,7 +73,7 @@ gdb_test "info tracepoint $asm_test_num" \ # 2.3 info tracepoint (invalid tracepoint number) gdb_test "info tracepoint [expr $c_test_num + $asm_test_num]" \ - "No tracepoint number [expr $c_test_num + $asm_test_num]." \ + "No tracepoint matching '[expr $c_test_num + $asm_test_num]'." \ "2.3: info tracepoint (invalid tracepoint number)" # 2.4 info tracepoints (list of numbers) @@ -89,6 +89,6 @@ gdb_test_multiple "info tracepoints $c_test_num $asm_test_num " \ # 2.5 help info trace gdb_test "help info tracepoints" \ - "Status of tracepoints, or tracepoint number NUMBER.*" \ + "Status of specified tracepoints .all tracepoints if no argument.*" \ "2.5: help info tracepoints" |