summaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-06-27 18:08:37 +0000
committerTom Tromey <tromey@redhat.com>2012-06-27 18:08:37 +0000
commitfbef701ec28f72adb73867b950c7eb5c08584e71 (patch)
tree4f4b9252878967c420f42db0275ff198d01fac0e /gdb/varobj.c
parent1a297a45393e9d6d3117c87c2aa81df6846bcfe9 (diff)
downloadgdb-fbef701ec28f72adb73867b950c7eb5c08584e71.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/varobj.c')
-rw-r--r--gdb/varobj.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 30864997210..42e2ce4f3bd 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -624,6 +624,7 @@ varobj_create (char *objname,
enum varobj_languages lang;
struct value *value = NULL;
volatile struct gdb_exception except;
+ CORE_ADDR pc;
/* Parse and evaluate the expression, filling in as much of the
variable's data as possible. */
@@ -650,9 +651,13 @@ varobj_create (char *objname,
if (type == USE_SELECTED_FRAME)
var->root->floating = 1;
+ pc = 0;
block = NULL;
if (fi != NULL)
- block = get_frame_block (fi, 0);
+ {
+ block = get_frame_block (fi, 0);
+ pc = get_frame_pc (fi);
+ }
p = expression;
innermost_block = NULL;
@@ -660,7 +665,7 @@ varobj_create (char *objname,
return a sensible error. */
TRY_CATCH (except, RETURN_MASK_ERROR)
{
- var->root->exp = parse_exp_1 (&p, block, 0);
+ var->root->exp = parse_exp_1 (&p, pc, block, 0);
}
if (except.reason < 0)
@@ -1471,7 +1476,7 @@ varobj_set_value (struct varobj *var, char *expression)
gdb_assert (varobj_editable_p (var));
input_radix = 10; /* ALWAYS reset to decimal temporarily. */
- exp = parse_exp_1 (&s, 0, 0);
+ exp = parse_exp_1 (&s, 0, 0, 0);
TRY_CATCH (except, RETURN_MASK_ERROR)
{
value = evaluate_expression (exp);