From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Faylor To: gdb@sources.redhat.com Subject: Re: Register group proposal Date: Tue, 27 Feb 2001 08:53:00 -0000 Message-id: <20010227115222.A11298@redhat.com> References: <17B78BDF120BD411B70100500422FC6309E218@IIS000> <20010226122752.M1296@redhat.com> <3A9AA65B.FE761EC0@cygnus.com> <20010226142740.B3520@redhat.com> <3A9AFC19.9673A100@cygnus.com> X-SW-Source: 2001-02/msg00412.html 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