summaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 701ef663766..20dd09bd585 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -311,7 +311,7 @@ varobj_create (const char *objname,
}
p = expression;
- innermost_block = NULL;
+ innermost_block.reset ();
/* Wrap the call to parse expression, so we can
return a sensible error. */
TRY
@@ -336,7 +336,7 @@ varobj_create (const char *objname,
}
var->format = variable_default_display (var.get ());
- var->root->valid_block = innermost_block;
+ var->root->valid_block = innermost_block.block ();
var->name = expression;
/* For a root var, the name and the expr are the same. */
var->path_expr = expression;
@@ -345,7 +345,7 @@ varobj_create (const char *objname,
we must select the appropriate frame before parsing
the expression, otherwise the value will not be current.
Since select_frame is so benign, just call it for all cases. */
- if (innermost_block)
+ if (var->root->valid_block)
{
/* User could specify explicit FRAME-ADDR which was not found but
EXPRESSION is frame specific and we would not be able to evaluate