[PATCH]: Updated fix for debug/7081
Daniel Berlin
dberlin@dberlin.org
Wed Jun 18 05:51:00 GMT 2003
On Tuesday, June 17, 2003, at 10:07 PM, Jason Merrill wrote:
> On Mon, 16 Jun 2003 18:46:25 -0400 (EDT), Daniel Berlin
> <dberlin@dberlin.org> wrote:
>
>>> We could also use a langhook. I think I might prefer that, actually.
>
>> Should the C++ FE decide what to tag it with, or just tell me whether
>> it's
>> a class or struct?
>
> The latter. No need for the FE to know about dwarf.
>
I'm willing to do this with a langhook, but just to point out, this
will become a serious problem when we add namespace support.
Adding it required moving quite a few tree macros and tree types from
the C++ FE to tree.h because they could appear at debug time, but were
C++ specific.
For example:
NAMESPACE_DECL appears in tree.def, as a common tree code.
All macros to actually access it, as well as the actual associated
types, including the important ones (DECL_NAMESPACE_USING), appear in
cp-tree.h.
The things linked from it, including USING_DECL (which apperas in
DECL_NAMESPACE_USING), are C++ trees defined in cp-tree.def.
Moving all of these to tree.def/tree.h seems a bad idea.
The other options are
1. Giving the actual results of the usings, etc, rather than keeping
them there, so that the debug info is still correct, though not exactly
the best we could do
2. Add a langhook or debug hooks and just handle this stuff in the C++
FE (either call into the C++ FE through the langhook, or have the C++
FE call debug hooks to output the actual info contained).
Option 2 seems more appealing to me, either way (push or pull), if only
because they *are* C++ specific, and this *is* C++ specific debug info.
So why shouldn't the C++ frontend be the one outputting it (by pull or
push)?
Mark said to just wait till you guys "clean up the C++ FE", whatever
that means :).
> Jason
More information about the Gcc-patches
mailing list