diff options
author | Pedro Alves <palves@redhat.com> | 2013-11-27 17:49:59 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-11-27 17:49:59 +0000 |
commit | 6bd273ae450b2ba626b0f7dbda10947e69578e1d (patch) | |
tree | a169529449c0bf2950b66b9bc89f088448d84ddf /gdb | |
parent | f6c01fc5156fde67bd62b1d66dee769dd88bf51e (diff) | |
download | gdb-6bd273ae450b2ba626b0f7dbda10947e69578e1d.zip gdb-6bd273ae450b2ba626b0f7dbda10947e69578e1d.tar.gz gdb-6bd273ae450b2ba626b0f7dbda10947e69578e1d.tar.bz2 |
Make "set debug frame 1" output print <not saved> instead of <optimized out>.
"set debug frame 1" is printing "<optimized out>" for not saved
registers. That's because the unwinders are returning optimized out
not_lval values instead of optimized out lval_register values. "<not
saved>" is how val_print_optimized_out prints lval_register values.
...
- { frame_unwind_register_value (frame=0,regnum=7(rsp),...) -> <optimized out> }
+ { frame_unwind_register_value (frame=0,regnum=7(rsp),...) -> <not saved> }
...
Tested on x86_64 Fedora 17.
2013-11-27 Pedro Alves <palves@redhat.com>
* frame-unwind.c (frame_unwind_got_optimized): Return
an lval_register value instead of a not_lval value.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/frame-unwind.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 727baba..a2da98f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-11-27 Pedro Alves <palves@redhat.com> + + * frame-unwind.c (frame_unwind_got_optimized): Return + an lval_register value instead of a not_lval value. + 2013-11-27 Andrew Burgess <aburgess@broadcom.com> * frame.c: Include "valprint.h". diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index ce2f6da..68879f3 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -161,10 +161,12 @@ default_frame_unwind_stop_reason (struct frame_info *this_frame, struct value * frame_unwind_got_optimized (struct frame_info *frame, int regnum) { - struct gdbarch *gdbarch = frame_unwind_arch (frame); - struct type *reg_type = register_type (gdbarch, regnum); + struct value *val; - return allocate_optimized_out_value (reg_type); + val = value_of_register_lazy (frame, regnum); + set_value_lazy (val, 0); + set_value_optimized_out (val, 1); + return val; } /* Return a value which indicates that FRAME copied REGNUM into |