* linker.c (link_action): Ignore duplicate warning syms.
[deliverable/binutils-gdb.git] / gdb / frame.h
index 561ae278ab1cdfbc13d378b5eb0283ea7f3081a4..b5f535a26d045b5257c1c4a03e377bc517007c44 100644 (file)
@@ -77,11 +77,11 @@ struct frame_info
        the frame, or zero if it was not saved on entry to this frame.
        This includes special registers such as pc and fp saved in
        special ways in the stack frame.  The SP_REGNUM is even more
-       special, the address here is the sp for the next frame, not the
-       address where the sp was saved.  */
+       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(). */
-    CORE_ADDR *saved_regs;     /*NUM_REGS */
+    CORE_ADDR *saved_regs;     /*NUM_REGS + NUM_PSEUDO_REGS*/
 
 #ifdef EXTRA_FRAME_INFO
     /* XXXX - deprecated */
@@ -96,8 +96,14 @@ struct frame_info
        initialized by INIT_EXTRA_FRAME_INFO */
     struct frame_extra_info *extra_info;
 
-    /* Pointers to the next and previous frame_info's in the frame cache.  */
-    struct frame_info *next, *prev;
+    /* If dwarf2 unwind frame informations is used, this structure holds all
+       related unwind data.  */
+    struct unwind_contect *context;
+
+    /* Pointers to the next (down, inner) and previous (up, outer)
+       frame_info's in the frame cache.  */
+    struct frame_info *next; /* down, inner */
+    struct frame_info *prev; /* up, outer */
   };
 
 /* Values for the source flag to be used in print_frame_info_base(). */
@@ -114,11 +120,17 @@ enum print_what
     LOC_AND_ADDRESS 
   };
 
-/* Allocate additional space for appendices to a struct frame_info. */
+/* Allocate additional space for appendices to a struct frame_info.
+   NOTE: Much of GDB's code works on the assumption that the allocated
+   saved_regs[] array is the size specified below.  If you try to make
+   that array smaller, GDB will happily walk off its end. */
 
-#ifndef SIZEOF_FRAME_SAVED_REGS
-#define SIZEOF_FRAME_SAVED_REGS (sizeof (CORE_ADDR) * (NUM_REGS))
+#ifdef SIZEOF_FRAME_SAVED_REGS
+#error "SIZEOF_FRAME_SAVED_REGS can not be re-defined"
 #endif
+#define SIZEOF_FRAME_SAVED_REGS \
+        (sizeof (CORE_ADDR) * (NUM_REGS+NUM_PSEUDO_REGS))
+
 extern void *frame_obstack_alloc (unsigned long size);
 extern void frame_saved_regs_zalloc (struct frame_info *);
 
@@ -140,9 +152,6 @@ extern void frame_saved_regs_zalloc (struct frame_info *);
    targets.  If FRAME_CHAIN_VALID returns zero it means that the given frame
    is the outermost one and has no caller.
 
-   If a particular target needs a different definition, then it can override
-   the definition here by providing one in the tm file.
-
    XXXX - both default and alternate frame_chain_valid functions are
    deprecated.  New code should use dummy frames and one of the
    generic functions. */
@@ -154,17 +163,6 @@ extern int generic_file_frame_chain_valid (CORE_ADDR, struct frame_info *);
 extern int generic_func_frame_chain_valid (CORE_ADDR, struct frame_info *);
 extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
 
-#if !defined (FRAME_CHAIN_VALID)
-#if !defined (FRAME_CHAIN_VALID_ALTERNATE)
-#define FRAME_CHAIN_VALID(chain, thisframe) file_frame_chain_valid (chain, thisframe)
-#else
-/* Use the alternate method of avoiding running up off the end of the frame
-   chain or following frames back into the startup code.  See the comments
-   in objfiles.h. */
-#define FRAME_CHAIN_VALID(chain, thisframe) func_frame_chain_valid (chain,thisframe)
-#endif /* FRAME_CHAIN_VALID_ALTERNATE */
-#endif /* FRAME_CHAIN_VALID */
-
 /* The stack frame that the user has specified for commands to act on.
    Note that one cannot assume this is the address of valid data.  */
 
This page took 0.038573 seconds and 4 git commands to generate.