a972d47
revert:
a972d47
commit 4f14910fa1331398cc695011a6af43a89252b4b1
a972d47
Author: Andrew Burgess <aburgess@broadcom.com>
a972d47
Date:   Tue Nov 26 16:21:53 2013 +0000
a972d47
a972d47
    Mark entirely optimized out value as non-lazy.
a972d47
    
a972d47
    If a value is entirely optimized out, then there's nothing for
a972d47
    value_fetch_lazy to fetch.  Sequences like:
a972d47
    
a972d47
     if (value_lazy (retval))
a972d47
       value_fetch_lazy (retval);
a972d47
    
a972d47
    End up allocating the value contents buffer, wasting memory, for no
a972d47
    use.
a972d47
    
a972d47
    gdb/ChangeLog
a972d47
    2013-11-26  Andrew Burgess  <aburgess@broadcom.com>
a972d47
    
a972d47
    	* value.c (allocate_optimized_out_value): Mark value as non-lazy.
a972d47
a972d47
### a/gdb/ChangeLog
a972d47
### b/gdb/ChangeLog
a972d47
## -1,3 +1,7 @@
a972d47
+2013-11-26  Andrew Burgess  <aburgess@broadcom.com>
a972d47
+
a972d47
+	* value.c (allocate_optimized_out_value): Mark value as non-lazy.
a972d47
+
a972d47
 2013-11-26  Tom Tromey  <tromey@redhat.com>
a972d47
 
a972d47
 	* dwarf2-frame.c (dwarf2_frame_cache): Revert patch from
a972d47
diff --git a/gdb/value.c b/gdb/value.c
a972d47
index 29abe5f..f073d71 100644
a972d47
--- a/gdb/value.c
a972d47
+++ b/gdb/value.c
a972d47
@@ -906,7 +906,7 @@ allocate_optimized_out_value (struct type *type)
a972d47
   struct value *retval = allocate_value_lazy (type);
a972d47
 
a972d47
   set_value_optimized_out (retval, 1);
a972d47
-  set_value_lazy (retval, 0);
a972d47
+
a972d47
   return retval;
a972d47
 }
a972d47