mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
[DWARF parser] Teach DIContext to fetch short (non-linkage) function names for a given address.
Change --functions option in llvm-symbolizer tool to accept values "none", "short" or "linkage". Update the tests and docs accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -277,13 +277,15 @@ DWARFDebugInfoEntryMinimal::getSubroutineName(const DWARFUnit *U,
|
||||
FunctionNameKind Kind) const {
|
||||
if (!isSubroutineDIE() || Kind == FunctionNameKind::None)
|
||||
return nullptr;
|
||||
// Try to get mangled name if possible.
|
||||
if (const char *name =
|
||||
getAttributeValueAsString(U, DW_AT_MIPS_linkage_name, nullptr))
|
||||
return name;
|
||||
if (const char *name = getAttributeValueAsString(U, DW_AT_linkage_name,
|
||||
nullptr))
|
||||
return name;
|
||||
// Try to get mangled name only if it was asked for.
|
||||
if (Kind == FunctionNameKind::LinkageName) {
|
||||
if (const char *name =
|
||||
getAttributeValueAsString(U, DW_AT_MIPS_linkage_name, nullptr))
|
||||
return name;
|
||||
if (const char *name =
|
||||
getAttributeValueAsString(U, DW_AT_linkage_name, nullptr))
|
||||
return name;
|
||||
}
|
||||
if (const char *name = getAttributeValueAsString(U, DW_AT_name, nullptr))
|
||||
return name;
|
||||
// Try to get name from specification DIE.
|
||||
|
Reference in New Issue
Block a user