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

Re: Register group proposal


On Mon, Feb 26, 2001 at 08:00:09PM -0500, Andrew Cagney wrote:
>Christopher Faylor wrote:
>> 
>> On Mon, Feb 26, 2001 at 01:54:19PM -0500, Andrew Cagney wrote:
>> >>That works fine if xxx is a struct.  If, at some point, you have an
>> >>amazing idea that allows you to change all xxx's to "unsigned short"
>> >>you're stuck with a lot of editing.
>> >
>> >Um, are you being serious here?
>> 
>> Do you have some kind of problem with this simple concept?  Been programming
>> long?
>
>GDB is made up of several objects.  Some have been identified - a
>frame, an architecture, the cli output device (ui-file / ui-out), and
>even a proposal for reggroup ....  Others are still lurking beneath the
>surface.
>
>I don't think you are seriously suggesting that one of these
>``fundamental'' objects - ex ``struct gdbarch *'' - be replaced by
>``unsigned short''.

I believe that someone did suggest using an "fd style" interface where
you are passing around a "handle" or a "cookie" rather than a pointer
to a struct/union/whatever.

However, I was just responding to the general point of typedefs being
useless, and the argument that struct could be used everywhere in place
of a typedef.  I was not advocating a particular implementation, just
noting, as others have, that there were advantages to their use.

I have never heard of another project that bans the use of typedefs
but I guess there aren't many projects like gdb.

cgf


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