* config/arm/xm-linux.h, config/ia64/xm-linux.h,
[deliverable/binutils-gdb.git] / gdb / frame.h
index 37fa97ccc34be12126e199acb798c101252e8eed..66ffa5c26b2f3e65944e4d89966757093324c649 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions for dealing with stack frames, for GDB, the GNU debugger.
-   Copyright 1986, 1989, 1991, 1992, 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+   1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -76,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 */
@@ -95,8 +96,10 @@ 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;
+    /* 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(). */
@@ -113,15 +116,21 @@ 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 *);
 
-/* Return the frame address from FR.  Except in the machine-dependent
+/* Return the frame address from FI.  Except in the machine-dependent
    *FRAME* macros, a frame address has no defined meaning other than
    as a magic cookie which identifies a frame over calls to the
    inferior.  The only known exception is inferior.h
@@ -265,4 +274,9 @@ extern void generic_get_saved_register (char *, int *, CORE_ADDR *,
                                        struct frame_info *, int,
                                        enum lval_type *);
 
+extern void get_saved_register (char *raw_buffer, int *optimized,
+                               CORE_ADDR * addrp,
+                               struct frame_info *frame,
+                               int regnum, enum lval_type *lval);
+
 #endif /* !defined (FRAME_H)  */
This page took 0.023537 seconds and 4 git commands to generate.