From: Andrew Burgess Date: Tue, 26 Nov 2013 16:21:53 +0000 (+0000) Subject: Mark entirely optimized out value as non-lazy. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f14910fa1331398cc695011a6af43a89252b4b1;p=binutils-gdb.git Mark entirely optimized out value as non-lazy. If a value is entirely optimized out, then there's nothing for value_fetch_lazy to fetch. Sequences like: if (value_lazy (retval)) value_fetch_lazy (retval); End up allocating the value contents buffer, wasting memory, for no use. gdb/ChangeLog 2013-11-26 Andrew Burgess * value.c (allocate_optimized_out_value): Mark value as non-lazy. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7e284361a77..c144565da2e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-11-26 Andrew Burgess + + * value.c (allocate_optimized_out_value): Mark value as non-lazy. + 2013-11-26 Tom Tromey * dwarf2-frame.c (dwarf2_frame_cache): Revert patch from diff --git a/gdb/value.c b/gdb/value.c index da7778f0192..8052f52f874 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -768,7 +768,7 @@ allocate_optimized_out_value (struct type *type) struct value *retval = allocate_value_lazy (type); set_value_optimized_out (retval, 1); - + set_value_lazy (retval, 0); return retval; }