struct frame_unwind;
struct block;
-/* The traditional frame unwinder. */
-extern const struct frame_unwind *trad_frame_unwind;
+/* A legacy unwinder to prop up architectures using the old style
+ saved regs array. */
+extern const struct frame_unwind *legacy_saved_regs_unwind;
/* The frame object. */
PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and
DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME. I suspect
the real problem here is that get_prev_frame() only sets
- initialized after INIT_EXTRA_FRAME_INFO as been called.
+ initialized after DEPRECATED_INIT_EXTRA_FRAME_INFO as been called.
Consequently, some targets found that the frame's type was wrong
and tried to fix it. The correct fix is to modify get_prev_frame()
so that it initializes the frame's type before calling any other
extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
-/* Unwind the frame ID. Return an ID that uniquely identifies the
- caller's frame. */
-extern struct frame_id frame_id_unwind (struct frame_info *frame);
-
/* Discard the specified frame. Restoring the registers to the state
of the caller. */
extern void frame_pop (struct frame_info *frame);
special, the address here is the sp for the previous frame, not
the address where the sp was saved. */
/* Allocated by frame_saved_regs_zalloc () which is called /
- initialized by FRAME_INIT_SAVED_REGS(). */
+ initialized by DEPRECATED_FRAME_INIT_SAVED_REGS(). */
CORE_ADDR *saved_regs; /*NUM_REGS + NUM_PSEUDO_REGS*/
#ifdef EXTRA_FRAME_INFO
/* Anything extra for this structure that may have been defined
in the machine dependent files. */
/* Allocated by frame_extra_info_zalloc () which is called /
- initialized by INIT_EXTRA_FRAME_INFO */
+ initialized by DEPRECATED_INIT_EXTRA_FRAME_INFO */
struct frame_extra_info *extra_info;
/* If dwarf2 unwind frame informations is used, this structure holds all
related unwind data. */
struct context *context;
- /* Unwind cache shared between the unwind functions - they had
- better all agree as to the contents. */
- void *unwind_cache;
+ /* Prologue cache shared between the unwind functions. See
+ "frame-unwind.h" for more information. */
+ void *prologue_cache;
/* The frame's unwinder. */
const struct frame_unwind *unwind;
int pc_unwind_cache_p;
CORE_ADDR pc_unwind_cache;
- /* Cached copy of the previous frame's ID. */
- int id_unwind_cache_p;
- struct frame_id id_unwind_cache;
+ /* This frame's ID. Note that the frame's ID, base and PC contain
+ redundant information. */
+ struct frame_id id;
/* Pointers to the next (down, inner, younger) and previous (up,
outer, older) frame_info's in the frame cache. */
#ifdef FRAME_FIND_SAVED_REGS
/* XXX - deprecated */
-#define FRAME_INIT_SAVED_REGS(FI) deprecated_get_frame_saved_regs (FI, NULL)
+#define DEPRECATED_FRAME_INIT_SAVED_REGS(FI) deprecated_get_frame_saved_regs (FI, NULL)
extern void deprecated_get_frame_saved_regs (struct frame_info *,
struct frame_saved_regs *);
#endif
/* NOTE: cagney/2002-06-26: Targets should no longer use this
function. Instead, the contents of a dummy frames registers can be
obtained by applying: frame_register_unwind to the dummy frame; or
- get_saved_register to the next outer frame. */
+ frame_register_unwind() to the next outer frame. */
extern char *deprecated_generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp);
enum lval_type *lvalp);
/* The function generic_get_saved_register() has been made obsolete.
- GET_SAVED_REGISTER now defaults to the recursive equivalent -
- generic_unwind_get_saved_register() - so there is no need to even
- set GET_SAVED_REGISTER. Architectures that need to override the
- register unwind mechanism should modify frame->unwind(). */
+ DEPRECATED_GET_SAVED_REGISTER now defaults to the recursive
+ equivalent - generic_unwind_get_saved_register() - so there is no
+ need to even set DEPRECATED_GET_SAVED_REGISTER. Architectures that
+ need to override the register unwind mechanism should modify
+ frame->unwind(). */
extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
struct frame_info *, int,
enum lval_type *);
extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
-extern void get_saved_register (char *raw_buffer, int *optimized,
- CORE_ADDR * addrp,
- struct frame_info *frame,
- int regnum, enum lval_type *lval);
-
/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a
function called frame_read_register_p(). This slightly weird (and
older) variant of frame_read_register() returns zero (indicating
extern void deprecated_set_frame_context (struct frame_info *fi,
struct context *context);
+/* Return non-zero if the architecture is relying on legacy frame
+ code. */
+extern int legacy_frame_p (struct gdbarch *gdbarch);
+
#endif /* !defined (FRAME_H) */