aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index f5d40bd..0c3009c 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -238,16 +238,22 @@ frame_register (struct frame_info *frame, int regnum,
}
void
-frame_unwind_signed_register (struct frame_info *frame, int regnum,
- LONGEST *val)
+frame_unwind_register (struct frame_info *frame, int regnum, void *buf)
{
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);
+}
+
+void
+frame_unwind_signed_register (struct frame_info *frame, int regnum,
+ LONGEST *val)
+{
+ void *buf = alloca (MAX_REGISTER_RAW_SIZE);
+ frame_unwind_register (frame, regnum, buf);
(*val) = extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
}
@@ -255,17 +261,19 @@ 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);
+ frame_unwind_register (frame, regnum, buf);
(*val) = extract_unsigned_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
}
void
+frame_read_register (struct frame_info *frame, int regnum, void *buf)
+{
+ gdb_assert (frame != NULL && frame->next != NULL);
+ frame_unwind_register (frame->next, regnum, buf);
+}
+
+void
frame_read_unsigned_register (struct frame_info *frame, int regnum,
ULONGEST *val)
{