summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/macscp.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-27 18:08:41 +0000
committerTom Tromey <tromey@redhat.com>2012-06-27 18:08:41 +0000
commit1bb9788dbb7f4c729acc0d5096d05d501a415824 (patch)
treedb2bb71b1982fe60ba133fe2e66171212c620fcd /gdb/testsuite/gdb.base/macscp.exp
parentc83ee9021b77f1c88121ab6abd3224fbcaa530ca (diff)
downloadbinutils-gdb-1bb9788dbb7f4c729acc0d5096d05d501a415824.tar.gz
PR macros/7961:
* varobj.c (varobj_create): Update. (varobj_set_value): Update. * tracepoint.c (validate_actionline): Update. (encode_actions_1): Update. * parse.c (parse_exp_1): Add 'pc' argument. (parse_exp_in_context): Add 'pc' argument. Change how expression_context_pc is set. (parse_expression): Update. (parse_field_expression): Update. * expression.h (parse_exp_1): Update. * eval.c (parse_to_comma_and_eval): Update. * breakpoint.c (set_breakpoint_condition): Update. (update_watchpoint): Update. (init_breakpoint_sal): Update (find_condition_and_thread): Update. (watch_command_1): Update. (update_breakpoint_locations): Update. * ada-lang.c (ada_read_renaming_var_value): Update. (create_excep_cond_exprs): Update. testsuite * gdb.base/macscp1.c (macscp_expr): Add breakpoint comment. * gdb.base/macscp.exp (maybe_kfail): Add test for macro scope.
Diffstat (limited to 'gdb/testsuite/gdb.base/macscp.exp')
-rw-r--r--gdb/testsuite/gdb.base/macscp.exp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index 5f29204e97a..1f995d57064 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -440,6 +440,17 @@ gdb_test "break [gdb_get_line_number "set breakpoint here"]" \
"Breakpoint.*at.* file .*, line.*" \
"breakpoint macscp_expr"
+gdb_test "cond \$bpnum foo == MACRO_TO_EXPAND" \
+ "No symbol \"MACRO_TO_EXPAND\" in current context\." \
+ "macro MACRO_TO_EXPAND not in scope at breakpoint"
+
+# Note that we choose the condition so that this breakpoint never
+# stops.
+set l2 [gdb_get_line_number "set second breakpoint here"]
+gdb_test "break $l2 if foo != MACRO_TO_EXPAND" \
+ "Breakpoint.*at.*" \
+ "breakpoint macscp_expr using MACRO_TO_EXPAND"
+
gdb_test "continue" "foo = 0;.*" "continue to macsp_expr"
gdb_test "print address.addr" \
@@ -450,7 +461,7 @@ gdb_test "print MACRO_TO_EXPAND" \
"No symbol \"MACRO_TO_EXPAND\" in current context\." \
"print expression with macro before define."
-gdb_test "next" "foo = 1;" "next to definition 1"
+gdb_test "next" "foo = 1;.*here.*/" "next to definition 1"
gdb_test "print MACRO_TO_EXPAND" \
" = 0" \