diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-12 21:16:48 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-12 21:16:48 +0000 |
commit | a7035dbbd10c5208e63cc3bc1b45f2dd8d16d7bb (patch) | |
tree | 9c200988328bc0af2cc5f23bb334b2414a80ae4d /gdb/value.c | |
parent | d07ed419cf333c92f5b7376c2f97a899b7359161 (diff) | |
download | gdb-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/value.c')
-rw-r--r-- | gdb/value.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c index ccd29c8..f308f3d 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -728,6 +728,18 @@ allocate_computed_value (struct type *type, return v; } +/* Allocate NOT_LVAL value for type TYPE being OPTIMIZED_OUT. */ + +struct value * +allocate_optimized_out_value (struct type *type) +{ + struct value *retval = allocate_value_lazy (type); + + set_value_optimized_out (retval, 1); + + return retval; +} + /* Accessor methods. */ struct value * |