diff options
| author | Alexander Shaposhnikov <shal1t712@gmail.com> | 2017-09-02 08:19:01 +0000 |
|---|---|---|
| committer | Alexander Shaposhnikov <shal1t712@gmail.com> | 2017-09-02 08:19:01 +0000 |
| commit | f1f9c34174bdb45f5305f2f10e7e7fde42627d58 (patch) | |
| tree | 33e8e9d491e8b286ca270b8692ef46b945a03ac8 /llvm/test/tools/llvm-dwp | |
| parent | 5c5b5a6253bc0ead6b57805c23298082f2fc5eea (diff) | |
| download | bcm5719-llvm-f1f9c34174bdb45f5305f2f10e7e7fde42627d58.tar.gz bcm5719-llvm-f1f9c34174bdb45f5305f2f10e7e7fde42627d58.zip | |
[llvm-dwp] Implement -e option
The binutils utility dwp has an option "-e"
https://gcc.gnu.org/wiki/DebugFissionDWP
to specify an executable/library to get the list
of *.dwo files from it. This option is particularly useful when
someone runs the tool manually outside of a build system.
This diff adds an implementation of "-e" to llvm-dwp.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D37371
llvm-svn: 312409
Diffstat (limited to 'llvm/test/tools/llvm-dwp')
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/a.dwo | bin | 0 -> 1312 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/b.dwo | bin | 0 -> 1384 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/c.dwo | bin | 0 -> 1312 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/d.dwo | bin | 0 -> 1312 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/e.dwo | bin | 0 -> 1312 bytes | |||
| -rwxr-xr-x | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/libd.so | bin | 0 -> 6832 bytes | |||
| -rwxr-xr-x | llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/main | bin | 0 -> 7608 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-dwp/X86/dwos_list_from_exec_simple.test | 97 |
8 files changed, 97 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/a.dwo b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/a.dwo Binary files differnew file mode 100644 index 00000000000..b6c77343564 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/a.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/b.dwo b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/b.dwo Binary files differnew file mode 100644 index 00000000000..d9084945838 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/b.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/c.dwo b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/c.dwo Binary files differnew file mode 100644 index 00000000000..60779693c89 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/c.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/d.dwo b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/d.dwo Binary files differnew file mode 100644 index 00000000000..42401022c2e --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/d.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/e.dwo b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/e.dwo Binary files differnew file mode 100644 index 00000000000..edca66e3af1 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/e.dwo diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/libd.so b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/libd.so Binary files differnew file mode 100755 index 00000000000..56a30cf3caf --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/libd.so diff --git a/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/main b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/main Binary files differnew file mode 100755 index 00000000000..a56edf63415 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/Inputs/dwos_list_from_exec/main diff --git a/llvm/test/tools/llvm-dwp/X86/dwos_list_from_exec_simple.test b/llvm/test/tools/llvm-dwp/X86/dwos_list_from_exec_simple.test new file mode 100644 index 00000000000..4bbc2fb7b62 --- /dev/null +++ b/llvm/test/tools/llvm-dwp/X86/dwos_list_from_exec_simple.test @@ -0,0 +1,97 @@ +REQUIRES: shell + +RUN: rm -rf %t +RUN: mkdir %t +RUN: cd %t +RUN: cp %p/../Inputs/dwos_list_from_exec/a.dwo a.dwo +RUN: cp %p/../Inputs/dwos_list_from_exec/b.dwo b.dwo +RUN: cp %p/../Inputs/dwos_list_from_exec/c.dwo c.dwo +RUN: cp %p/../Inputs/dwos_list_from_exec/d.dwo d.dwo +RUN: cp %p/../Inputs/dwos_list_from_exec/e.dwo e.dwo +RUN: cp %p/../Inputs/dwos_list_from_exec/main main +RUN: cp %p/../Inputs/dwos_list_from_exec/libd.so libd.so +RUN: llvm-dwp c.dwo e.dwo -e main -e libd.so -o pkg.dwp +RUN: llvm-dwarfdump pkg.dwp | FileCheck %s + +Build commands for the test binaries: + +clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf a.cpp b.cpp -o main +clang++ -g -O0 -gsplit-dwarf -c c.cpp -o c.o +clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf -fPIC -shared d.cpp -o libd.so +clang++ -g -O0 -gsplit-dwarf -c e.cpp -o e.o + +sources: +a.cpp: + void a() {} + +b.cpp: + void b() {} + int main() { + return 0; + } + +c.cpp: + void c() {} + +d.cpp: + void d() {} + +e.cpp: + void e() {} + +CHECK-LABEL: .debug_abbrev.dwo contents: + +CHECK-LABEL: Abbrev table for offset: +CHECK: DW_TAG_compile_unit +CHECK: DW_TAG_subprogram + +CHECK-LABEL: Abbrev table for offset: +CHECK: DW_TAG_compile_unit +CHECK: DW_TAG_subprogram + +CHECK-LABEL: Abbrev table for offset: +CHECK: DW_TAG_compile_unit +CHECK: DW_TAG_subprogram + +CHECK-LABEL: Abbrev table for offset: +CHECK: DW_TAG_compile_unit +CHECK: DW_TAG_subprogram + +CHECK-LABEL: Abbrev table for offset: +CHECK: DW_TAG_compile_unit +CHECK: DW_TAG_subprogram + +CHECK: .debug_info.dwo contents: +CHECK: [[AOFF:0x[0-9a-f]*]]: + +CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 +CHECK: DW_TAG_compile_unit +CHECK: DW_AT_name {{.*}} "c.cpp" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "c" + +CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 +CHECK: DW_TAG_compile_unit +CHECK: DW_AT_name {{.*}} "e.cpp" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "e" + +CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 +CHECK: DW_TAG_compile_unit +CHECK: DW_AT_name {{.*}} "a.cpp" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "a" + +CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 +CHECK: DW_TAG_compile_unit +CHECK: DW_AT_name {{.*}} "b.cpp" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "b" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "main" + +CHECK-LABEL: Compile Unit: length = {{.*}} version = 0x0004 +CHECK: DW_TAG_compile_unit +CHECK: DW_AT_name {{.*}} "d.cpp" +CHECK: DW_TAG_subprogram +CHECK: DW_AT_name {{.*}} "d" |

