diff options
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 2da0305..82754ef 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -122,6 +122,33 @@ frame_register_unwind (struct frame_info *frame, int regnum, optimizedp, lvalp, addrp, realnump, bufferp); } +void +frame_unwind_signed_register (struct frame_info *frame, int regnum, + LONGEST *val) +{ + int optimized; + CORE_ADDR addr; + int realnum; + enum lval_type lval; + void *buf = alloca (MAX_REGISTER_RAW_SIZE); + frame_register_unwind (frame, regnum, &optimized, &lval, &addr, + &realnum, buf); + (*val) = extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum)); +} + +void +frame_unwind_unsigned_register (struct frame_info *frame, int regnum, + ULONGEST *val) +{ + int optimized; + CORE_ADDR addr; + int realnum; + enum lval_type lval; + void *buf = alloca (MAX_REGISTER_RAW_SIZE); + frame_register_unwind (frame, regnum, &optimized, &lval, &addr, + &realnum, buf); + (*val) = extract_unsigned_integer (buf, REGISTER_VIRTUAL_SIZE (regnum)); +} void generic_unwind_get_saved_register (char *raw_buffer, |