Merge "vndk-vtable-dumper: Use demangled name of symbol while handling symbol aliasing." into pi-dev

This commit is contained in:
Jayant Chowdhary
2018-05-23 16:29:10 +00:00
committed by Android (Google) Code Review

View File

@@ -329,8 +329,9 @@ SymbolRef ELFSharedObject<ELFT>::matchValueToSymbol(
const std::string ClassName(Vtablep->getDemangledName().substr(pos)); const std::string ClassName(Vtablep->getDemangledName().substr(pos));
for (const SymbolRef &Symbol : SymVec) { for (const SymbolRef &Symbol : SymVec) {
StringRef SymbolName = UnWrap(Symbol.getName()); StringRef SymbolName = UnWrap(Symbol.getName());
if (SymbolName.str().find(ClassName) != std::string::npos) if (demangle(SymbolName.str()).find(ClassName) != std::string::npos) {
return Symbol; return Symbol;
}
} }
// Return the 1st Symbol by default. // Return the 1st Symbol by default.
return SymVec[0]; return SymVec[0];