[Dwarf-discuss] tag nesting question

Marcel Mettes marcelm
Fri Dec 22 11:02:35 GMT 2006


> In the specific case of GCC, we'd either have to have a callback to
> the C++ FE at debug info output to ask it whether it's struct/class,
> or waste a bit in the type structure to store this info.
>
> I posted a patch about 3 years ago that wasted a bit.
> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7081
> and
> http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01748.html
>
> I never got back to updating it in response to the comments, even
> though they were very minor, as i started law school back up again
> soon after.
>
> If you really feel like it, you could update this patch and resubmit it.
>
> Nowadays, I think it's a waste of time to differentiate the two :)
>
>
As being someone who works on debuggers, I would love to see the extra info.
One of my personal goals for the debugger is that it shows exactly what 
was present in the original source code that was compiled, so that 
someone who is debugging may spot an error because of the actual input. 
Hiding differences like struct versus class is not likely to hide bugs, 
but in general I prefer as much detail as possible.

Also, with g++ compiled objects, the debugger must first use some test 
to detect how to display DW_TAG_struct_type (personally I do not want to 
see struct when debugging C++) which I do not like much myself. I would 
like to use as little heuristics as possible, there is enough confusion 
already :-).





More information about the Dwarf-discuss mailing list