This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [very old] Re: dwarf2 cleanup
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: Elena Zannoni <ezannoni at redhat dot com>, Jason Merrill <jason at redhat dot com>, Dan Nicolaescu <dann at godzilla dot ICS dot UCI dot EDU>, binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 21 Jun 2002 22:41:05 -0400
- Subject: Re: [very old] Re: dwarf2 cleanup
- References: <200102151617.aa17403@gremlin-relay.ics.uci.edu><npbsa5yg7c.fsf@zwingli.cygnus.com><15634.29938.777456.889449@localhost.redhat.com><np3cvgv3pg.fsf@zwingli.cygnus.com>
Jim Blandy writes:
>
> Elena Zannoni <ezannoni@redhat.com> writes:
> > Jim Blandy writes:
> > > The gdb/dwarf2read.c portion of this change is approved. I'm sorry I
> > > waited 16 months to review this straightforward change.
> > >
> > > The include/elf/dwarf2 stuff is shared with binutils (BFD uses it), so
> > > I think we need their stamp, as well.
> >
> > A couple of things. dwarf2.h has changed since the time this patch was
> > posted. So this patch would need to be updated. I've also noticed that
> > the corresponding changes to gcc/dwarf2.h, etc. were never committed.
> > Rereading the old gcc-patches thread, there were also problems with the
> > use of '#' instead of STRINGX.
>
> The GCC patches were waiting on approval for the corresponding GDB
> patches, to avoid divergence.
>
There isn't a hard dependence, the two copies are separate, but, yes,
it's good practice to keep them in sync. ``In theory'' the gcc patches
could have gone in. But if/when we unify the files, problem solved.
> The stringification issues had been resolved, I thought; the last
> message in the thread is from Kaveh R. Ghazi, and says:
>
> This works:
>
> > #define FOO(x) STRINGIFY(x)
> > FOO(bar)
>
> You get "bar", which is I think what Dan did.
>
This was the end of the gcc thread, which is where a second version of
the patch, changed this
#define DEFDWARF2_CALL_FRAME_INFO(SYM, VAL) case SYM: return #SYM;
to this
#define DEFDWARF2_CALL_FRAME_INFO(SYM, VAL) case SYM: return STRINGIFY (SYM);
What I was saying is that the same should be done with the
corresponding gdb patch. I said STRINGX when I should have said
STRINGIFY. Sorry if that wasn't clear.
> > There are 2 versions of dwarf2.h, which could be unified. I've heard
> > 'rumours' that this was going to eventually happen, i.e. gcc would
> > drop its own version and just use the include/elf one. Jason? Would
> > this be feasible?
>
> I hope so! That confused me for a bit when I ran into it.
Actually, looking more closely, those functions are the same as well.
Elena