This is the mail archive of the 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]

Re: ARI `asection' and `sec_ptr'

On Mon, Feb 24, 2003 at 10:08:00AM -0500, Andrew Cagney wrote:
> >On Mon, Feb 24, 2003 at 01:43:26AM -0500, Andrew Cagney wrote:
> >
> >>Hello,
> >>
> >>Assuming I'm reading the code right.  BFD has the declarations:
> >>
> >>typedef struct sec
> >>{
> >>  ...
> >>} asection;
> >>typedef struct sec *sec_ptr;
> >>
> >>GDB uses all three (sec_ptr, asection, struct sec) and that makes things 
> >>pretty confusing.  Consequently, I've added asection and sec_ptr to the 
> >>ARI.  Instead people can use `struct sec *' which is consistent with 
> >>GDB's other types.
> >
> >
> >Must you?  BFD makes a conscious effort to (almost always) use
> >asection* in its interfaces.  If you want to reduce bfd.h includes,
> >solve this one in BFD too.
> Que?  Where, in the above did I mention #includes?  As I pointed out, 

I was just guessing at reasons for the preference.  Apparently I was

> GDB uses all three of these vis:
> 	asection *foo;
> 	sec_ptr foo;
> 	struct sec *foo;
> so unless the developer happens to know this relationship, they can miss 
> some vital relationships.
> GDB's preference is `struct sec' however, yes, BFD may have other 
> preferences.  You'll note that I've already sent out a patch to clarify 
> the status of `struct _bfd'.

Why is GDB's preference 'struct sec', and why should GDB have a
preference?  This is a BFD export; I believe we should use the one
which BFD prefers.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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