diff options
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/frame.c | 5 | ||||
-rw-r--r-- | gdb/value.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4a64fca..ea1cff3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2016-12-06 Yao Qi <yao.qi@linaro.org> + + * frame.c (frame_register_unwind): Set *realnump if *lvalp is + lval_register. + * value.c (deprecated_value_next_frame_id_hack): Assert + value->lval is lval_register. + (deprecated_value_regnum_hack): Likewise. + 2016-12-02 Simon Marchi <simon.marchi@polymtl.ca> * ui-out.h: Include "common/enum-flags.h". diff --git a/gdb/frame.c b/gdb/frame.c index 5414cb3..00001bc 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1107,7 +1107,10 @@ frame_register_unwind (struct frame_info *frame, int regnum, *unavailablep = !value_entirely_available (value); *lvalp = VALUE_LVAL (value); *addrp = value_address (value); - *realnump = VALUE_REGNUM (value); + if (*lvalp == lval_register) + *realnump = VALUE_REGNUM (value); + else + *realnump = -1; if (bufferp) { diff --git a/gdb/value.c b/gdb/value.c index cc291cf..022900f 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1576,12 +1576,14 @@ deprecated_value_internalvar_hack (struct value *value) struct frame_id * deprecated_value_next_frame_id_hack (struct value *value) { + gdb_assert (value->lval == lval_register); return &value->location.reg.next_frame_id; } int * deprecated_value_regnum_hack (struct value *value) { + gdb_assert (value->lval == lval_register); return &value->location.reg.regnum; } |