aboutsummaryrefslogtreecommitdiff
path: root/gdb/findvar.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-12 21:16:48 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-12 21:16:48 +0000
commita7035dbbd10c5208e63cc3bc1b45f2dd8d16d7bb (patch)
tree9c200988328bc0af2cc5f23bb334b2414a80ae4d /gdb/findvar.c
parentd07ed419cf333c92f5b7376c2f97a899b7359161 (diff)
downloadgdb-a7035dbbd10c5208e63cc3bc1b45f2dd8d16d7bb.zip
gdb-a7035dbbd10c5208e63cc3bc1b45f2dd8d16d7bb.tar.gz
gdb-a7035dbbd10c5208e63cc3bc1b45f2dd8d16d7bb.tar.bz2
gdb/
Code cleanup making also optimized out values lazy. * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use allocate_optimized_out_value. Twice. (loclist_read_variable) Use allocate_optimized_out_value. Once. * findvar.c (read_var_value): Likewise. * value.c (allocate_optimized_out_value): New function. * value.h (allocate_optimized_out_value): New declaration.
Diffstat (limited to 'gdb/findvar.c')
-rw-r--r--gdb/findvar.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 2b361efe..a700c02 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -577,10 +577,7 @@ read_var_value (struct symbol *var, struct frame_info *frame)
break;
case LOC_OPTIMIZED_OUT:
- v = allocate_value_lazy (type);
- VALUE_LVAL (v) = not_lval;
- set_value_optimized_out (v, 1);
- return v;
+ return allocate_optimized_out_value (type);
default:
error (_("Cannot look up value of a botched symbol."));