This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Accessor macro wrappers removal [Re: [patch] static_kind -> bit0, bit1]
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org, Tobias Burnus <burnus at net-b dot de>, Ulrich Weigand <uweigand at de dot ibm dot com>, Jim Blandy <jimb at red-bean dot com>, jimb at codesourcery dot com
- Date: Fri, 26 Sep 2008 08:54:22 -0400
- Subject: Re: Accessor macro wrappers removal [Re: [patch] static_kind -> bit0, bit1]
- References: <20080818111120.GE16894@adacore.com> <200808181553.m7IFrG3w005270@d12av02.megacenter.de.ibm.com> <48A59B3C.9050801@net-b.de> <20080818111120.GE16894@adacore.com> <20080907115637.GA12939@host0.dyn.jankratochvil.net> <20080919221221.GA23372@adacore.com> <20080926044309.GA3803@host0.dyn.jankratochvil.net>
On Fri, Sep 26, 2008 at 06:43:09AM +0200, Jan Kratochvil wrote:
> On Sat, 20 Sep 2008 00:12:21 +0200, Joel Brobecker wrote:
> > > Also I do not understand why exist all the macros like this one at all:
> > > #define TYPE_MAIN_TYPE(thistype) (thistype)->main_type
> > > Why we cannot use it expanded? This way it is always one (or more)
> > > "tags"-jump (VIM ctrl-]) indirections while navigating the source files.
> >
> > Personally, I find them to be very useful to quickly find who is using
> > field "main_type" in struct type.
>
> How does it differ from
> grep -- '->main_type\>' *.[ch]
> ?
"in struct type" is the difference.
For main_type it's not too bad. But for e.g. TYPE_FIELD_TYPE you can
see the problem; there's lots of things that have a type. If you're
looking just for the ones that come from a "struct field", it can be
pretty awful to locate them all.
--
Daniel Jacobowitz
CodeSourcery