diff options
author | Andrew Burgess <aburgess@broadcom.com> | 2013-11-26 16:21:53 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-11-26 16:21:53 +0000 |
commit | 4f14910fa1331398cc695011a6af43a89252b4b1 (patch) | |
tree | ff24b7e95b70b13fd756d0ca2378bf23925f4517 /gdb/value.c | |
parent | 4920638856fd2ee27d0f61330e75a05b8d719f02 (diff) | |
download | gdb-4f14910fa1331398cc695011a6af43a89252b4b1.zip gdb-4f14910fa1331398cc695011a6af43a89252b4b1.tar.gz gdb-4f14910fa1331398cc695011a6af43a89252b4b1.tar.bz2 |
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 <aburgess@broadcom.com>
* value.c (allocate_optimized_out_value): Mark value as non-lazy.
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/value.c b/gdb/value.c index da7778f..8052f52 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; } |