aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-break.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-break.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-break.exp12
1 files changed, 12 insertions, 0 deletions
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