diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-07-02 05:54:45 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-07-02 05:54:45 +0000 |
commit | 3e25c4a1e3e58bc1d00d894854a29dd2e4e7e88a (patch) | |
tree | 742a54896b5de0397c3d8cbf4809e0e225ea016e /test/DebugInfo | |
parent | 9c3d5a70f40f9e7bb90f3cb8ec1d87cff6e3f0ae (diff) |
This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF parser:
1) DIContext is now able to return function name for a given instruction address (besides file/line info).
2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag).
3) test case that checks the basic functionality of llvm-dwarfdump added
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rwxr-xr-x | test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 | bin | 0 -> 10246 bytes | |||
-rwxr-xr-x | test/DebugInfo/Inputs/dwarfdump-test2.elf-x86-64 | bin | 0 -> 7774 bytes | |||
-rw-r--r-- | test/DebugInfo/dwarfdump-test.test | 25 |
3 files changed, 25 insertions, 0 deletions
diff --git a/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 b/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 Binary files differnew file mode 100755 index 0000000000..7cee968072 --- /dev/null +++ b/test/DebugInfo/Inputs/dwarfdump-test.elf-x86-64 diff --git a/test/DebugInfo/Inputs/dwarfdump-test2.elf-x86-64 b/test/DebugInfo/Inputs/dwarfdump-test2.elf-x86-64 Binary files differnew file mode 100755 index 0000000000..a226e79f3b --- /dev/null +++ b/test/DebugInfo/Inputs/dwarfdump-test2.elf-x86-64 diff --git a/test/DebugInfo/dwarfdump-test.test b/test/DebugInfo/dwarfdump-test.test new file mode 100644 index 0000000000..84fe7f3ec8 --- /dev/null +++ b/test/DebugInfo/dwarfdump-test.test @@ -0,0 +1,25 @@ +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test.elf-x86-64 \ +RUN: --address=0x400589 --functions | FileCheck %s -check-prefix MAIN +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test.elf-x86-64 \ +RUN: --address=0x400558 --functions | FileCheck %s -check-prefix FUNCTION +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test.elf-x86-64 \ +RUN: --address=0x4005b6 --functions | FileCheck %s -check-prefix CTOR_WITH_SPEC +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test2.elf-x86-64 \ +RUN: --address=0x4004b8 --functions | FileCheck %s -check-prefix MANY_CU_1 +RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test2.elf-x86-64 \ +RUN: --address=0x4004c4 --functions | FileCheck %s -check-prefix MANY_CU_2 + +MAIN: main +MAIN-NEXT: dwarfdump-test.cc:16:10 + +FUNCTION: _Z1fii +FUNCTION-NEXT: dwarfdump-test.cc:11:18 + +CTOR_WITH_SPEC: _ZN10DummyClassC1Ei +CTOR_WITH_SPEC-NEXT: dwarfdump-test.cc:4:30 + +MANY_CU_1: a +MANY_CU_1-NEXT: a.cc:2:0 + +MANY_CU_2: main +MANY_CU_2-NEXT: main.cc:4:0 |