diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2009-10-30 17:34:53 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2009-10-30 17:34:53 +0000 |
commit | 5d4e2b767e44cee2c4c2ecff7e37c35376b94826 (patch) | |
tree | 72a4ba02c92eb9d1325f1a9e39a6ad7d621eb64d /gdb/testsuite | |
parent | b6cdf8aeedfdd676071a057e861d37a4e81be416 (diff) | |
download | gdb-5d4e2b767e44cee2c4c2ecff7e37c35376b94826.zip gdb-5d4e2b767e44cee2c4c2ecff7e37c35376b94826.tar.gz gdb-5d4e2b767e44cee2c4c2ecff7e37c35376b94826.tar.bz2 |
Fix breakpoint commands in MI.
* mi/mi-main.c (mi_execute_command): Run bpstat_do_actions.
* mi/mi-cmd-break.c (mi_cmd_break_commands): Pass 1 to
read_command_line_1 to actually parse composite commands.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-break.exp | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d17b4ce..7073194 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-10-30 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.mi/mi-break.exp (test_breakpoint_commands): Test + that composite commands are parsed OK. And also test + that breakpoint commands do work. + 2009-10-23 Michael Snyder <msnyder@vmware.com> gdb.reverse/consecutive-precsave.exp: Change expect pattern diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index 8d06c0e..76c58c7 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -219,6 +219,21 @@ proc test_breakpoint_commands {} { mi_list_breakpoints [list [list 7 "keep" "callee2" "basics.c" "$line_callee2_body" $hex]] \ "breakpoint commands: check that commands are cleared" + + mi_run_to_main + + mi_create_breakpoint "basics.c:callee2" 9 keep callee2 ".*basics.c" $line_callee2_body $hex \ + "breakpoint commands: insert breakpoint at basics.c:callee2, again" + + mi_gdb_test "-break-commands 9 \"set \$i=0\" \"while \$i<10\" \"print \$i\" \"set \$i=\$i+1\" \"end\" \"continue\" " \ + "\\^done" \ + "breakpoint commands: set commands" + + mi_gdb_test "-exec-continue" \ + ".*\\\$1 = 0.*\\\$10 = 9.*\\*running.*\\*stopped,reason=\"exited-normally\".*" \ + "test hitting breakpoint with commands" + + } test_tbreak_creation_and_listing |