mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 10:16:43 +00:00
[LLVMSymbolize] Use symbol table only if function linkage name was requested.
Now it's enough to just specify -functions=short without additionally providing -use-symbol-table=false. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251339 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f1d03dae6
commit
43a759de81
@ -209,7 +209,8 @@ DILineInfo ModuleInfo::symbolizeCode(
|
||||
ModuleOffset, getDILineInfoSpecifier(Opts));
|
||||
}
|
||||
// Override function name from symbol table if necessary.
|
||||
if (Opts.PrintFunctions != FunctionNameKind::None && Opts.UseSymbolTable) {
|
||||
if (Opts.PrintFunctions == FunctionNameKind::LinkageName &&
|
||||
Opts.UseSymbolTable) {
|
||||
std::string FunctionName;
|
||||
uint64_t Start, Size;
|
||||
if (getNameFromSymbolTable(SymbolRef::ST_Function, ModuleOffset,
|
||||
@ -233,7 +234,8 @@ DIInliningInfo ModuleInfo::symbolizeInlinedCode(
|
||||
InlinedContext.addFrame(DILineInfo());
|
||||
}
|
||||
// Override the function name in lower frame with name from symbol table.
|
||||
if (Opts.PrintFunctions != FunctionNameKind::None && Opts.UseSymbolTable) {
|
||||
if (Opts.PrintFunctions == FunctionNameKind::LinkageName &&
|
||||
Opts.UseSymbolTable) {
|
||||
DIInliningInfo PatchedInlinedContext;
|
||||
for (uint32_t i = 0, n = InlinedContext.getNumberOfFrames(); i < n; i++) {
|
||||
DILineInfo LineInfo = InlinedContext.getFrame(i);
|
||||
|
@ -154,7 +154,7 @@ RUN: | FileCheck %s --check-prefix=STRIPPED
|
||||
STRIPPED: global_func
|
||||
|
||||
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
|
||||
RUN: llvm-symbolizer --functions=short --use-symbol-table=false --demangle=false < %t.input7 \
|
||||
RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
|
||||
RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
|
||||
|
||||
SHORT_FUNCTION_NAME-NOT: _Z1cv
|
||||
|
Loading…
x
Reference in New Issue
Block a user