[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:
Alexey Samsonov
2014-05-17 00:07:48 +00:00
parent 2d1fa5f718
commit bf6e3f9257
7 changed files with 40 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input
RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input
RUN: echo "%p/Inputs/llvm-symbolizer-dwo-test 0x400514" >> %t.input
RUN: llvm-symbolizer --functions --inlining --demangle=false \
RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
RUN: --default-arch=i386 < %t.input | FileCheck %s
CHECK: main
@@ -87,3 +87,9 @@ RUN: llvm-symbolizer --obj %p/Inputs/shared-object-stripped.elf-i386 < %t.input6
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: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
SHORT_FUNCTION_NAME-NOT: _Z1cv