diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-02-01 16:24:47 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-02-01 16:24:47 +0000 |
commit | 98deb0daaefbe4fd9a2664a636aa71fb8aa678dd (patch) | |
tree | 048aa91c316f6f45b4eca253e52556f82ba36646 /gdb/testsuite/gdb.mi | |
parent | ce0451adace70feabf93904e7a574fea21154073 (diff) | |
download | gdb-98deb0daaefbe4fd9a2664a636aa71fb8aa678dd.zip gdb-98deb0daaefbe4fd9a2664a636aa71fb8aa678dd.tar.gz gdb-98deb0daaefbe4fd9a2664a636aa71fb8aa678dd.tar.bz2 |
* breakpoint.c (break_command_1): Return void.
(break_command_really): Return void. Rethrow
exceptions instead of returning.
(gdb_breakpoint): Remove the error_message parameter.
Return void. Rename to set_breakpoint.
* gdb.h (gdb_breakpoint): Rename and move to...
* breakpoint.h (set_breakpoint): ...here.
* mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
event hooks even if exception is thrown. Adjust to
gdb_breakpoint interface changes.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r-- | gdb/testsuite/gdb.mi/basics.c | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-break.exp | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c index 5b52112..e4be7b2 100644 --- a/gdb/testsuite/gdb.mi/basics.c +++ b/gdb/testsuite/gdb.mi/basics.c @@ -51,6 +51,11 @@ void callme (int i) printf ("callme\n"); } +int return_1 () +{ + return 1; +} + main () { callee1 (2, "A string argument.", 3.5); diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index 6933a34..9f10364 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -181,6 +181,18 @@ proc test_error {} { mi_gdb_test "-break-insert function_that_does_not_exist" \ ".*\\^error,msg=\"Function \\\\\"function_that_does_not_exist\\\\\" not defined.\"" \ "breakpoint at nonexistent function" + + # We used to have a bug whereby -break-insert that failed would not + # clear some event hooks. As result, whenever we evaluate expression + # containing function call, the internal breakpoint created to handle + # function call would be reported, messing up MI output. + mi_gdb_test "-var-create V * return_1()" \ + "\\^done,name=\"V\",numchild=\"0\",value=\"1\",type=\"int\"" \ + "create varobj for function call" + + mi_gdb_test "-var-update *" \ + "\\^done,changelist=\\\[\\\]" \ + "update varobj for function call" } test_tbreak_creation_and_listing |