This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] comdat types

On Thu, Jun 25, 2009 at 5:01 PM, Cary Coutant<> wrote:
>> I'm curious about one thing on this page, and I thought I'd take the
>> opportunity to ask. ?DW_TAG_type_unit may have a DW_AT_language child.
>> But, the language is not mentioned in the suggested method for
>> computing a type's signature. ?This seems strange to me: either the
>> language matters (in which case, it seems like it ought to be in the
>> signature); or the language does not matter, in which case, why
>> mention it?
> DW_AT_language was a late addition, and if I recall correctly, it was
> at Doug's request because there were still some places in gdb where
> the language mattered. It's an attribute of the type_unit (just like
> it is of the compile_unit), not of the type itself, so it's not
> involved in computing the type signature. Theoretically, if two type
> definitions from different languages generate the same signature,
> they're still the same type, and should be merged together. On the
> other hand, if the language really does matter to gdb, maybe they
> shouldn't be merged. I'm not sure it's likely enough to matter much,
> although I think it would be desirable for a C type and the same type
> in C++ to have the same signature. I had the impression that the
> dependence on language was a wart, and that ideally, it really
> shouldn't be necessary, so the language attribute is there only as
> helpful extra information.

I looked back, and apparently it there's by request of the dwarf committee.
Since it's there I made use of it, but that can change of course.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]