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