This is an archive of the discontinued LLVM Phabricator instance.

[llvm-symbolizer] Respect the demangling option, and and -relative-address
ClosedPublic

Authored by zturner on May 1 2015, 3:04 PM.

Details

Reviewers
samsonov
timurrrr
Summary

This patch correctly respects the -demangle option, and additionally adds a hidden -relative-address option allows input addresses to be relative to the module load address instead of absolute addresses into the image.

Diff Detail

Event Timeline

zturner updated this revision to Diff 24835.May 1 2015, 3:04 PM
zturner retitled this revision from to [llvm-symbolizer] Respect the demangling option, and and -relative-address .
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added reviewers: samsonov, timurrrr.
zturner added a subscriber: Unknown Object (MLST).
samsonov accepted this revision.May 1 2015, 4:49 PM
samsonov edited edge metadata.

LGTM (after simplification suggested below).

lib/DebugInfo/PDB/PDBContext.cpp
53

Please move it to a separate function

std::string getFunctionName(uint64_t Address, PDBSymbol *FnSymbol, DINameKind NameKind);

with a bunch of early-returns, and just do

Result.FunctionName = getFunctionName(Address, Symbol.get(), Specifier.FNKind);
This revision is now accepted and ready to land.May 1 2015, 4:49 PM

Oh, one more thing: please add tests for this.

Just for the linkage name right? I don't think we want to add test for
-relative-address if we hide it and plan to remove it anyway

Yeah, I mean tests for demangling.

zturner closed this revision.Oct 15 2015, 1:54 PM