xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/debug-line-str.yaml (revision ea1f5133cc572720bbb9a90d271a59d99a55845d)
1## a) Test that llvm-dwarfdump is able to dump the debug_line_str section.
2
3##                        "abc\0cba\0\0"
4# RUN: yaml2obj -DCONTENT="616263006362610000" %s -o %t1.o
5# RUN: llvm-dwarfdump --debug-line-str %t1.o | FileCheck %s --check-prefix=LINE-STR
6
7#       LINE-STR: .debug_line_str contents:
8#  LINE-STR-NEXT: 0x00000000: "abc"
9#  LINE-STR-NEXT: 0x00000004: "cba"
10#  LINE-STR-NEXT: 0x00000008: ""
11# LINE-STR-EMPTY:
12
13--- !ELF
14FileHeader:
15  Class: ELFCLASS64
16  Data: ELFDATA2LSB
17  Type: ET_EXEC
18Sections:
19  - Name:    .debug_line_str
20    Type:    SHT_PROGBITS
21    Content: [[CONTENT]]
22
23## b) Test how we dump unprintable chars.
24
25##                        ['\t', '\0', '\001', '\0', '\\', '0', '0', '1', '\0']
26# RUN: yaml2obj -DCONTENT="090001005C30303100" %s -o %t2.o
27# RUN: llvm-dwarfdump --debug-line-str %t2.o | FileCheck %s --check-prefix=ESCAPED
28
29#      ESCAPED: .debug_line_str contents:
30# ESCAPED-NEXT: 0x00000000: "\t"
31# ESCAPED-NEXT: 0x00000002: "\001"
32# ESCAPED-NEXT: 0x00000004: "\\001"
33