[PATCH] Add tree and rtl accessor functions for debuggers

Daniel Berlin dan@www.cgsoftware.com
Thu May 10 16:36:00 GMT 2001


On Thu, 10 May 2001, Stan Shebs wrote:

> Mark Mitchell wrote:
> >
> > It shouldn't be a very big project given that DWARF2 can conveniently
> > represent macro definitions and that cpplib makes expanding macros a
> > snap.
>
> I've looked into this a bit, since I fantasize about doing this myself
> someday, and it's a multi-month project for someone who knows something
> about both GCC and GDB, even just for Dwarf2.
I can't see how.
In fact, i have a basic working prototype that took me about 4 days to do
in gdb, and about a weeks worth of gcc work.
It's really *not* that difficult.
I'll gladly give it to you to work on if you like.

>   Amusing details include
> macros whose expansions are different at different points in the source,
I don't see how this is a problem.
in GDB, Every time we saw a new define, I added a new symbol, and started
a subblock, in the block corresponding to the code  where the define
occurred (macro debug section processing was done after symbol proceessing).
Every time we saw an undef, we closed the subblock.

Macros who expansions differ at different points in the source are no
different from names referring to different variables at different points
in the source.
Unless i'm on the crack again.
> and getting cpplib to link into a completely different
program - and
> to keep it linking as GCC and GDB change (GCC and GDB folks can't even
> agree to have a single repository :-( ).

>
> Stan
>



More information about the Gcc-patches mailing list