From: Andrew Burgess Date: Wed, 27 Nov 2013 17:49:59 +0000 (+0000) Subject: Make "set debug frame 1" use the standard print routine for optimized out values. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6c01fc5156fde67bd62b1d66dee769dd88bf51e;p=binutils-gdb.git Make "set debug frame 1" use the standard print routine for optimized out values. ... - { frame_unwind_register_value (frame=0,regnum=7(rsp),...) -> optimized out } + { frame_unwind_register_value (frame=0,regnum=7(rsp),...) -> } ... Tested on x86_64 Fedora 17. 2013-11-27 Andrew Burgess * frame.c: Include "valprint.h". (frame_unwind_register_value): Use value_optimized_out. * value.c (value_fetch_lazy): Likewise. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c144565da2e..727babab768 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-11-27 Andrew Burgess + + * frame.c: Include "valprint.h". + (frame_unwind_register_value): Use value_optimized_out. + * value.c (value_fetch_lazy): Likewise. + 2013-11-26 Andrew Burgess * value.c (allocate_optimized_out_value): Mark value as non-lazy. diff --git a/gdb/frame.c b/gdb/frame.c index f77ce75a098..4e6e06cbaac 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -44,6 +44,7 @@ #include "inline-frame.h" #include "tracepoint.h" #include "hashtab.h" +#include "valprint.h" static struct frame_info *get_prev_frame_1 (struct frame_info *this_frame); static struct frame_info *get_prev_frame_raw (struct frame_info *this_frame); @@ -1047,7 +1048,10 @@ frame_unwind_register_value (struct frame_info *frame, int regnum) { fprintf_unfiltered (gdb_stdlog, "->"); if (value_optimized_out (value)) - fprintf_unfiltered (gdb_stdlog, " optimized out"); + { + fprintf_unfiltered (gdb_stdlog, " "); + val_print_optimized_out (value, gdb_stdlog); + } else { if (VALUE_LVAL (value) == lval_register) diff --git a/gdb/value.c b/gdb/value.c index 8052f52f874..a64e7e117ee 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3572,7 +3572,10 @@ value_fetch_lazy (struct value *val) fprintf_unfiltered (gdb_stdlog, "->"); if (value_optimized_out (new_val)) - fprintf_unfiltered (gdb_stdlog, " optimized out"); + { + fprintf_unfiltered (gdb_stdlog, " "); + val_print_optimized_out (new_val, gdb_stdlog); + } else { int i;