This is the mail archive of the gdb-prs@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]
Other format: [Raw text]

pending/1002: [patch/rfc] Make `struct frame_info' opaque ish


>Number:         1002
>Category:       pending
>Synopsis:       [patch/rfc] Make `struct frame_info' opaque ish
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   unknown
>Arrival-Date:   Fri Jan 31 05:48:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 This is a multi-part message in MIME format.
 --------------020300070201020308090805
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 This one needs some thought,
 
 It `hacks' "frame.h" and "frame.c" so that, except for old old 
 non-multi-arch targets that use EXTRA_FRAME_INFO, the `struct 
 frame_info' object is opaque.
 
 The objective is to stop existing code accessing frame info internals - 
 the next step in the frame overhaul involves changing certain internals 
 and I'd like to be certain that nothing is assessing the old internal 
 structures.
 
 In the long run, the `struct frame_info' would be moved to "frame.c".
 
 Thoughts?
 
 Sooner or later, there will need to be a flag day when this patch is 
 committed (I'd prefer sooner so it is well before the 5.4 branch).
 
 In the mean time, I get to try this patch out on various platforms and 
 fix any breakage.  I encourage others to do the same on their platform.
 
 enjoy,
 Andrew
 
 --------------020300070201020308090805
 Content-Type: text/plain;
  name="diffs"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="diffs"
 
 2003-01-08  Andrew Cagney  <cagney@redhat.com>
 
 	* frame.h (struct frame_info): Only declare when either FRAME_C or
 	EXTRA_FRAME_INFO is defined.
 	* frame.c (FRAME_C): Define.
 
 Index: frame.c
 ===================================================================
 RCS file: /cvs/src/src/gdb/frame.c,v
 retrieving revision 1.55
 diff -u -r1.55 frame.c
 --- frame.c	7 Jan 2003 22:53:09 -0000	1.55
 +++ frame.c	8 Jan 2003 20:34:33 -0000
 @@ -20,6 +20,12 @@
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
  
 +/* FIXME: 2003-01-08: "frame.h" uses this macro as a trigger to
 +   declare `struct frame_info'.  Once all architectures are
 +   multi-arched, that declaration can be moved to this file, and this
 +   macro define deleted.  */
 +#define FRAME_C
 +
  #include "defs.h"
  #include "frame.h"
  #include "target.h"
 Index: frame.h
 ===================================================================
 RCS file: /cvs/src/src/gdb/frame.h,v
 retrieving revision 1.58
 diff -u -r1.58 frame.h
 --- frame.h	7 Jan 2003 22:53:09 -0000	1.58
 +++ frame.h	8 Jan 2003 20:34:33 -0000
 @@ -356,6 +356,10 @@
    };
  #endif
  
 +/* FIXME: cagney/2003-01-08: Once all architectures are multi-arched,
 +   this conditional declaration can be moved to "frame.c".  */
 +#if defined (FRAME_C) || defined (EXTRA_FRAME_INFO)
 +
  /* We keep a cache of stack frames, each of which is a "struct
     frame_info".  The innermost one gets allocated (in
     wait_for_inferior) each time the inferior stops; current_frame
 @@ -446,6 +450,7 @@
      int prev_p;
      struct frame_info *prev; /* up, outer, older */
    };
 +#endif
  
  /* Values for the source flag to be used in print_frame_info_base(). */
  enum print_what
 
 --------------020300070201020308090805--
 
 
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


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