aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/frame.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3907fa3..73b5a4e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * frame.c (frame_register_unwind): Do not access contents
+ of "optimized out" unwound register value.
+
2010-06-14 Jan Kratochvil <jan.kratochvil@redhat.com>
* ada-lang.h (ada_print_type): Make varstring const.
diff --git a/gdb/frame.c b/gdb/frame.c
index a7258d0..d003c44 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -771,7 +771,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
*addrp = value_address (value);
*realnump = VALUE_REGNUM (value);
- if (bufferp)
+ if (bufferp && !*optimizedp)
memcpy (bufferp, value_contents_all (value),
TYPE_LENGTH (value_type (value)));