2003-03-17 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / frame.h
index 646d6f6df8bbeaf1b9bae6233695df2ac0430cd3..ee0fc7e49b10163233ee94ea31fe628d595349bc 100644 (file)
@@ -27,8 +27,9 @@ struct symtab_and_line;
 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.  */
 
@@ -243,7 +244,7 @@ extern enum frame_type get_frame_type (struct frame_info *);
    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
@@ -310,10 +311,6 @@ extern const char *frame_map_regnum_to_name (int regnum);
 
 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);
@@ -381,7 +378,7 @@ struct frame_info
        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
@@ -394,16 +391,16 @@ struct 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;
@@ -412,9 +409,9 @@ struct frame_info
     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.  */
@@ -465,7 +462,7 @@ extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
 
 #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
@@ -542,7 +539,7 @@ extern int generic_pc_in_call_dummy (CORE_ADDR pc,
 /* 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);
 
@@ -558,21 +555,17 @@ void generic_unwind_get_saved_register (char *raw_buffer,
                                        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
@@ -705,4 +698,8 @@ extern struct context *deprecated_get_frame_context (struct frame_info *fi);
 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)  */
This page took 0.02624 seconds and 4 git commands to generate.