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