+2020-10-13 Pedro Alves <pedro@palves.net>
+
+ * lib/mi-support.exp (mi_runto_main): New proc.
+ (mi_run_to_main): Use it.
+ * gdb.mi/mi-catch-cpp-exceptions.exp: Likewise.
+ * gdb.mi/mi-var-cmd.exp: Likewise.
+ * gdb.mi/mi-var-invalidate.exp: Likewise.
+ * mi-var-list-children-invalid-grandchild.exp: Likewise.
+ * gdb.mi/mi2-amd64-entry-value.exp: Likewise.
+ * gdb.mi/new-ui-mi-sync.exp: Likewise.
+ * gdb.mi/user-selected-context-sync.exp: Likewise.
+ * gdb.opt/inline-cmds.exp: Likewise.
+ * gdb.python/py-framefilter-mi.exp: Likewise.
+ * gdb.python/py-mi.exp: Likewise.
+
2020-10-13 Pedro Alves <pedro@palves.net>
* gdb.ada/fun_in_declare.exp: Use "runto_main" instead of
# Test various kinds of `set print entry-values'.
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "no: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "only: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "preferred: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "if-needed: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"},{name="inv@entry",value="<optimized out>"}} .* .* {.* disp="keep"} "both: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values"
mi_expect_stop "breakpoint-hit" .* {{name="inv",value="<optimized out>"}} .* .* {.* disp="keep"} "compact: invalid: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
-if {[mi_runto main] == -1} {
+if {[mi_runto_main] == -1} {
return -1
}
mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values"