diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-21 20:15:30 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-21 20:15:30 +0000 |
| commit | 26f9a0c5297ec09a2b057bcb818d64c9414f5f01 (patch) | |
| tree | 862dc9da36ec8147dc4d43aa58ac34de69b309b5 /llvm/test/tools/llvm-dwarfdump/X86 | |
| parent | 05eac276776d51323d36d2d29c4d2f8482fc75c3 (diff) | |
| download | bcm5719-llvm-26f9a0c5297ec09a2b057bcb818d64c9414f5f01.tar.gz bcm5719-llvm-26f9a0c5297ec09a2b057bcb818d64c9414f5f01.zip | |
[dwarfdump] Add verbose output for .debug-line section
This patch adds dumping of line table instructions as well as the final
state at each specified pc value in verbose mode. This is essentially
the same as the default in Darwin's dwarfdump. Dumping the actual line
table opcodes can be particularly useful for something like debugging a
bad `.debug_line` section.
Differential revision: https://reviews.llvm.org/D37971
llvm-svn: 313910
Diffstat (limited to 'llvm/test/tools/llvm-dwarfdump/X86')
| -rw-r--r-- | llvm/test/tools/llvm-dwarfdump/X86/brief.s | 15 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-dwarfdump/X86/verbose.test | 25 |
2 files changed, 36 insertions, 4 deletions
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/brief.s b/llvm/test/tools/llvm-dwarfdump/X86/brief.s index d77a007929e..06a9d24dd0d 100644 --- a/llvm/test/tools/llvm-dwarfdump/X86/brief.s +++ b/llvm/test/tools/llvm-dwarfdump/X86/brief.s @@ -1,5 +1,5 @@ # RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \ -# RUN: | llvm-dwarfdump -debug-info - \ +# RUN: | llvm-dwarfdump --debug-info --debug-line - \ # RUN: | FileCheck %s # CHECK-NOT: .debug_abbrev contents: @@ -12,12 +12,19 @@ # CHECK: DW_AT_name ("int") # CHECK-NOT: debug_str # CHECK-NOT: DW_AT_type {{.*}} => -# + +# CHECK: Address Line Column File ISA Discriminator Flags +# CHECK-NEXT:------------------ ------ ------ ------ --- ------------- ------------- +# CHECK-NEXT:0x0000000000000000 1 0 1 0 0 is_stmt +# CHECK-NEXT:0x0000000000000006 1 12 1 0 0 is_stmt prologue_end +# CHECK-NEXT:0x0000000000000008 1 12 1 0 0 is_stmt end_sequence + # CHECK-NOT: {{.*}} contents: -# + # This test is meant to verify that without specifying -verbose DW_FORMs and # abbreviation codes are hidden from .debug_info section. Furthermore it -# verifies that it also hides .debug_str and die reference offsets into the CU. +# verifies that it also hides .debug_str and die reference offsets into the CU +# and that the .debug_line table is printed rather than the opcodes. .section __TEXT,__text,regular,pure_instructions .macosx_version_min 10, 12 diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verbose.test b/llvm/test/tools/llvm-dwarfdump/X86/verbose.test new file mode 100644 index 00000000000..2d52247f15f --- /dev/null +++ b/llvm/test/tools/llvm-dwarfdump/X86/verbose.test @@ -0,0 +1,25 @@ +# RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \ +# RUN: | llvm-dwarfdump -v --debug-info --debug-line - \ +# RUN: | FileCheck %s + +# CHECK-NOT: .debug_abbrev contents: + +# CHECK: .debug_info contents: +# CHECK: DW_TAG_compile_unit [1] +# CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{.*}}] = "brief.c") +# CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{.*}}] = "main") +# CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{.*}}] = "int") + +# CHECK: .debug_line contents: +# CHECK: 00 DW_LNE_set_address (0x0000000000000000) +# CHECK: 01 DW_LNS_copy +# CHECK: 0x0000000000000000 1 0 1 0 0 is_stmt +# CHECK: 05 DW_LNS_set_column (12) +# CHECK: 0a DW_LNS_set_prologue_end +# CHECK: 66 address += 89, line += 0 +# CHECK: 0x0000000000000006 1 12 1 0 0 is_stmt prologue_end +# CHECK: 02 DW_LNS_advance_pc (2) +# CHECK: 00 DW_LNE_end_sequence +# CHECK: 0x0000000000000008 1 12 1 0 0 is_stmt end_sequence +# +# CHECK-NOT: {{.*}} contents: |

