From 21a176fb79de04c0460c1be5a7d7d49a7ca1cfc4 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 14 Jun 2010 12:10:56 +0000 Subject: [PATCH] * frame.c (frame_register_unwind): Do not access contents of "optimized out" unwound register value. --- gdb/ChangeLog | 5 +++++ gdb/frame.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3907fa30f1b..73b5a4ef60f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-06-14 Ulrich Weigand + + * frame.c (frame_register_unwind): Do not access contents + of "optimized out" unwound register value. + 2010-06-14 Jan Kratochvil * ada-lang.h (ada_print_type): Make varstring const. diff --git a/gdb/frame.c b/gdb/frame.c index a7258d0af98..d003c446084 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))); -- 2.30.2