This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] fix comment on saved_regs, next, prev


FYI,

I've checked in the attached as, er, ``obvious''.  Hopefully it 
clarifies which direction ``next'' and ``prev'' and that magic stack 
pointer are ment to be going in.
If anyone is feeling truly inspired, I think it would be nice to have 
``next'' and ``prev'' replaced with ``up'' and ``down'' ... :-)

enjoy,
	Andrew
2001-08-28  Andrew Cagney  <cagney@toribio.toronto.redhat.com>

	* frame.h (struct frame_info): Fix documentation on fields
	saved_regs, next and prev.

Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.6
diff -p -r1.6 frame.h
*** frame.h	2001/03/21 16:42:38	1.6
--- frame.h	2001/08/29 00:50:19
*************** struct frame_info
*** 77,84 ****
         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.  */
      /* Allocated by frame_saved_regs_zalloc () which is called /
         initialized by FRAME_INIT_SAVED_REGS(). */
      CORE_ADDR *saved_regs;	/*NUM_REGS + NUM_PSEUDO_REGS*/
--- 77,84 ----
         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 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 + NUM_PSEUDO_REGS*/
*************** struct frame_info
*** 96,103 ****
         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;
    };
  
  /* Values for the source flag to be used in print_frame_info_base(). */
--- 96,105 ----
         initialized by INIT_EXTRA_FRAME_INFO */
      struct frame_extra_info *extra_info;
  
!     /* 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(). */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]