From ff1ee6a0235f846f714f58bb245c1d20b18623c4 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 17 Sep 2002 20:42:01 +0000 Subject: 2002-09-17 Andrew Cagney * h8300-tdep.c (h8300_frame_chain): (h8300_frame_saved_pc): * blockframe.c (deprecated_read_register_dummy): Rename generic_read_register_dummy. * frame.c (frame_unwind_signed_register): New function. (frame_unwind_unsigned_register): New function. * frame.h (frame_unwind_signed_register): Declare. (frame_unwind_unsigned_register): Declare. (deprecated_read_register_dummy): Rename generic_read_register_dummy. * xstormy16-tdep.c (xstormy16_frame_saved_pc): Update. * rs6000-tdep.c (rs6000_frame_saved_pc): Update. * s390-tdep.c (s390_frame_saved_pc_nofix): Update. (s390_frame_chain): Update. * v850-tdep.c (v850_find_callers_reg): Update. (v850_frame_saved_pc): Update. * m32r-tdep.c (m32r_init_extra_frame_info): Update. (m32r_find_callers_reg): Update. (m32r_frame_saved_pc): Update. * sh-tdep.c (sh_find_callers_reg): Update. (sh64_get_saved_pr): Update. (sh_init_extra_frame_info): Update. (sh_init_extra_frame_info): Update. (sh64_init_extra_frame_info): Update. (sh64_init_extra_frame_info): Update. * mcore-tdep.c (mcore_find_callers_reg): Update. (mcore_frame_saved_pc): Update. (mcore_init_extra_frame_info): Update. * i386-tdep.c (i386_frame_saved_pc): Update. * ia64-tdep.c (ia64_frame_saved_pc): Update. (ia64_init_extra_frame_info): Update. (ia64_init_extra_frame_info): Update. * d10v-tdep.c (d10v_frame_saved_pc): Update. * cris-tdep.c (cris_init_extra_frame_info): Update. * avr-tdep.c (avr_frame_chain): Update. (avr_init_extra_frame_info): Update. (avr_frame_saved_pc): Update. * arm-tdep.c (arm_find_callers_reg): Update. (arm_init_extra_frame_info): Update. (arm_frame_saved_pc): Update. --- gdb/frame.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gdb/frame.c') diff --git a/gdb/frame.c b/gdb/frame.c index 2da03059389..82754ef1ce5 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, -- cgit v1.2.1