aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 82d0f58..1c7e3b9 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -511,7 +511,7 @@ value_of_variable (var, b)
else
{
fr = block_innermost_frame (b);
- if (fr == NULL)
+ if (fr == NULL && symbol_read_needs_frame (var))
{
if (BLOCK_FUNCTION (b) != NULL
&& SYMBOL_NAME (BLOCK_FUNCTION (b)) != NULL)