[Dwarf-discuss] Re: Dwarf-discuss Digest, Vol 8, Issue 2

Jim Blandy jimb
Wed Apr 20 13:05:34 GMT 2005


brender at gemevn.zko.dec.com (Ron 603-884-2088) writes:
>  1) If you want to support modules with no debugging information except
>     what you can infer from the link-time mangled name (and I absolutely
>     applaud doing so!), then you still need debugger mechanism to
>     map a name string into the underlying "language standard type"
>     code.

You're assuming that one would demangle the link name, producing a
source name, and then parse the source name.  This is circuitous: the
notation used in mangled names corresponds exactly to the vocabulary
of types used by the standard --- that's one of the primary
requirements for mangled names to do their job.

>  2) Adding a new *required* DWARF attribute for C++ language makes
>     V3 not upward compatible with V2. It might provide a small lever
>     to convince compilers to "upgrade" if/when they claim V3
>     support (for other reasons), but in all likelyhood any debugger
>     will need to cope without such an attribute for quite some time.
> 
>     Of course, if the attribute is optional (preserving upward
>     compatibility) then the coping period is necessarily forever!

Right.  But the reason for being unhappy about parsing names is not
just that it's extra code --- it's that it's slow and error-prone.
Where the compiler produces the extra attribute, the debugger can be
faster and more reliable.





More information about the Dwarf-discuss mailing list