[Dwarf-Discuss] Dwarf-Discuss Digest, Vol 27, Issue 2
Dodji Seketeli
dodji@redhat.com
Wed Sep 2 07:53:45 GMT 2009
Le 31/08/2009 16:07, Kendrick Wong a ?crit :
>>>> Should the name in DW_AT_instantiated_name be normalized?
>>>> i.e. A<std :: vector>
>>>> There could be space characters in the within the name "std::vector",
> is
>>>> it necessary to enforce a 'no-space' rule in the name?
>>>
>>> Is there any reason why that attribute would not follow the same rules
> as
>>> DW_AT_name ?
>>
>> Well, DW_AT_name is unqualified. But I would expect a qualified
>> DW_AT_instantiated_name to look like a qualified name in
> .debug_pubnames.
>
> The DWARF spec does not say anything about normalizing the fully qualified
> names in .debug_pubnames:
> "In the case of the name of a function member or static data member of a
> C++ structure, class or union, the name presented in the .debug_pubnames
> section is not the simple name given by the DW_AT_name attribute of the
> referenced debugging information entry, but rather the fully qualified
> name of the data or function member. "
> My first thought is to add the 'no-space' rule for the qualified name, but
> I do realize that there are some C++ names that requires the additional
> space. (i.e. std::vector<std::list<int> >) [This space is no longer
> required in C++0x]. Perhaps the rules should be: "In the case the
> qualified name has multiple spellings, the one with the shortest spelling
> should be used." Any thoughts?
I would tend to just let this unspecified to give a chance to accommodate
cases like the one you just suggested. Right now, DW_AT_name allows
template-ids with space like foo<int, char>. Allowing
DW_AT_instantiated_name to be consistent with that would make sense I think.
--
Dodji Seketeli
Red Hat
More information about the Dwarf-discuss
mailing list