From a216a322341d49ebb6eff80fe9a49542b545c7d0 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 5 Nov 2002 21:44:05 +0000 Subject: 2002-11-05 Andrew Cagney * gdbarch.sh (GET_SAVED_REGISTER): Change to a predicate function. * gdbarch.h, gdbarch.c: Regnerate. * frame.h (frame_register): Declare. * frame.c (frame_register): New function. (get_saved_register): Test GET_SAVED_REGISTER_P before calling GET_SAVED_REGISTER, otherwize call generic_unwind_get_saved_register. (frame_register_read): Use frame_register instead of get_saved_register. --- gdb/frame.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/frame.h') diff --git a/gdb/frame.h b/gdb/frame.h index 89a148e..8fd9244 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -350,6 +350,16 @@ extern void frame_register_unwind (struct frame_info *frame, int regnum, CORE_ADDR *addrp, int *realnump, void *valuep); +/* Return the value of the register in this FRAME. Convenience + function that is equivalent to frame_register_unwind + (get_next_frame (FRAME), ...). If VALUEP is NULL, don't + fetch/compute the value. */ + +extern void frame_register (struct frame_info *frame, int regnum, + int *optimizedp, enum lval_type *lvalp, + CORE_ADDR *addrp, int *realnump, + void *valuep); + /* Unwind FRAME so that the value of register REGNUM, in the previous frame is returned. Simplified versions of frame_register_unwind. */ /* NOTE: cagney/2002-09-13: Return void as one day these functions may -- cgit v1.1