Page MenuHomePhabricator

[DWARF] If linkages names are missing, use decl context to get qualified names.
ClosedPublic

Authored by sivachandra on Mar 23 2015, 5:24 PM.

Details

Summary

This commit adds this alternate route only when parsing variable dies
corresponding to global or static variables. The motivation for this is that GCC
does not emit linkage names for functions and variables declared/defined in
anonymous namespaces. Having this alternate route fixes one part of
TestNamespace which fails when the test case is compiled with GCC.

An alternate route to get fully qualified names of functions whose linkage names
are missing will be added with a followup change. With that, the other failing
part of TestNamespace will also be fixed.

Diff Detail

Event Timeline

sivachandra retitled this revision from to [DWARF] If linkages names are missing, use decl context to get qualified names..
sivachandra updated this object.
sivachandra edited the test plan for this revision. (Show Details)
sivachandra added a reviewer: clayborg.
sivachandra added a subscriber: Unknown Object (MLST).

I could have combined the fix for function names as well in this change. However, before I went that full a distance, I wanted to get early feedback on the general direction of this change. One would require to generate a name with the param types included to affect a similar change for functions (which would then fix TestNamespace completely when the test case is compiled with GCC).

clayborg requested changes to this revision.Mar 23 2015, 5:40 PM
clayborg edited edge metadata.

Just fix the language compare so we aren't looking for a string "c++" and use the enum and this should be good.

source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
7407

We should add a function that can ask the language enums if they are C++ or not and use that instead of making a string.

7416

Make a function that lives somewhere that is something like:

static bool
LanguageIsCPlusPlus (LanguageType language);
This revision now requires changes to proceed.Mar 23 2015, 5:40 PM
sivachandra edited edge metadata.

Add a static method LanguageRuntime::LanguageIsCPlusPlus and use it.

clayborg accepted this revision.Mar 24 2015, 11:01 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Mar 24 2015, 11:01 AM
sivachandra closed this revision.Mar 24 2015, 11:35 AM