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/MC/ARM | |
| 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/MC/ARM')
| -rw-r--r-- | llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s | 12 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/dwarf-asm-multiple-sections.s | 13 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s | 12 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/dwarf-asm-single-section.s | 12 |
4 files changed, 26 insertions, 23 deletions
diff --git a/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s b/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s index e6a36fc8e85..cc1d85e9691 100644 --- a/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s +++ b/llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s @@ -1,5 +1,5 @@ // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp -dwarf-version 2 2>&1 | FileCheck -check-prefix MESSAGES %s -// RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF %s +// RUN: llvm-dwarfdump -a %t | FileCheck -check-prefix DWARF %s // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s .section .text, "ax" @@ -24,13 +24,13 @@ b: // DWARF: DW_AT_language DW_FORM_data2 // DWARF: .debug_info contents: -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1] +// DWARF: DW_TAG_compile_unit // DWARF-NOT: DW_TAG_ -// DWARF: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) -// DWARF: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000004) +// DWARF: DW_AT_low_pc {{.*}}(0x0000000000000000) +// DWARF: DW_AT_high_pc {{.*}}(0x0000000000000004) -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] * -// DWARF-NEXT: DW_AT_name [DW_FORM_string] ("a") +// DWARF: DW_TAG_label +// DWARF-NEXT: DW_AT_name {{.*}}("a") // DWARF: .debug_aranges contents: diff --git a/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s b/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s index 4294c485364..1ae0bdf33b1 100644 --- a/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s +++ b/llvm/test/MC/ARM/dwarf-asm-multiple-sections.s @@ -1,11 +1,14 @@ // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 5 -fdebug-compilation-dir=/tmp // RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF -check-prefix DWARF45 %s +// RUN: llvm-dwarfdump --debug-line %t | FileCheck -check-prefix DWARF-DL %s // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC -check-prefix RELOC5 %s // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp // RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF -check-prefix DWARF45 %s +// RUN: llvm-dwarfdump --debug-line %t | FileCheck -check-prefix DWARF-DL %s // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC -check-prefix RELOC4 %s // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 3 -fdebug-compilation-dir=/tmp // RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF -check-prefix DWARF3 %s +// RUN: llvm-dwarfdump --debug-line %t | FileCheck -check-prefix DWARF-DL %s // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 2 2>&1 | FileCheck -check-prefix VERSION %s // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 1 2>&1 | FileCheck -check-prefix DWARF1 %s // RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 6 2>&1 | FileCheck -check-prefix DWARF6 %s @@ -48,11 +51,11 @@ b: // DWARF-NEXT: [0x00000000 - 0x00000004) -// DWARF: .debug_line contents: -// DWARF: 0x0000000000000000 14 0 1 0 0 is_stmt -// DWARF-NEXT: 0x0000000000000004 14 0 1 0 0 is_stmt end_sequence -// DWARF-NEXT: 0x0000000000000000 18 0 1 0 0 is_stmt -// DWARF-NEXT: 0x0000000000000004 18 0 1 0 0 is_stmt end_sequence +// DWARF-DL: .debug_line contents: +// DWARF-DL: 0x0000000000000000 17 0 1 0 0 is_stmt +// DWARF-DL-NEXT: 0x0000000000000004 17 0 1 0 0 is_stmt end_sequence +// DWARF-DL-NEXT: 0x0000000000000000 21 0 1 0 0 is_stmt +// DWARF-DL-NEXT: 0x0000000000000004 21 0 1 0 0 is_stmt end_sequence // DWARF: .debug_ranges contents: diff --git a/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s b/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s index 22a242e9103..e846fb7c7a4 100644 --- a/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s +++ b/llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s @@ -1,5 +1,5 @@ // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp -// RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF %s +// RUN: llvm-dwarfdump -a %t | FileCheck -check-prefix DWARF %s // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s .section foo, "ax" @@ -18,13 +18,13 @@ b: // DWARF: DW_AT_language DW_FORM_data2 // DWARF: .debug_info contents: -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1] +// DWARF: DW_TAG_compile_unit // DWARF-NOT: DW_TAG_ -// DWARF: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) -// DWARF: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000004) +// DWARF: DW_AT_low_pc (0x0000000000000000) +// DWARF: DW_AT_high_pc (0x0000000000000004) -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] * -// DWARF-NEXT: DW_AT_name [DW_FORM_string] ("b") +// DWARF: DW_TAG_label +// DWARF-NEXT: DW_AT_name ("b") // DWARF: .debug_aranges contents: diff --git a/llvm/test/MC/ARM/dwarf-asm-single-section.s b/llvm/test/MC/ARM/dwarf-asm-single-section.s index d1211a6e48c..7bc0572f5ab 100644 --- a/llvm/test/MC/ARM/dwarf-asm-single-section.s +++ b/llvm/test/MC/ARM/dwarf-asm-single-section.s @@ -1,5 +1,5 @@ // RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp -// RUN: llvm-dwarfdump -v %t | FileCheck -check-prefix DWARF %s +// RUN: llvm-dwarfdump -a %t | FileCheck -check-prefix DWARF %s // RUN: llvm-objdump -r %t | FileCheck -check-prefix RELOC %s .section .text, "ax" @@ -19,13 +19,13 @@ a: // DWARF: DW_AT_language DW_FORM_data2 // DWARF: .debug_info contents: -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1] +// DWARF: DW_TAG_compile_unit // DWARF-NOT: DW_TAG_ -// DWARF: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) -// DWARF: DW_AT_high_pc [DW_FORM_addr] (0x0000000000000004) +// DWARF: DW_AT_low_pc (0x0000000000000000) +// DWARF: DW_AT_high_pc (0x0000000000000004) -// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_label [2] * -// DWARF-NEXT: DW_AT_name [DW_FORM_string] ("a") +// DWARF: DW_TAG_label +// DWARF-NEXT: DW_AT_name ("a") // DWARF: .debug_aranges contents: |

