xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/debug_info_offset.test (revision d3f9f2138d953025cf46720138ee41dd567e5b4d)
1RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
2RUN:   | llvm-dwarfdump -debug-info=0x0000000b - | FileCheck %s
3CHECK: .debug_info contents:
4CHECK: 0x0000000b: DW_TAG_compile_unit
5CHECK:               DW_AT_name
6CHECK-NOT: {{:}}
7
8RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
9RUN:   | llvm-dwarfdump -debug-info=0 - \
10RUN:   | FileCheck --allow-empty --check-prefix=EMPTY %s
11EMPTY-NOT: DW_TAG
12
13RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
14RUN:   | llvm-dwarfdump -debug-info=0x0000000b -c - \
15RUN:   | FileCheck %s --check-prefix=CHILDREN
16
17RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
18RUN:   | llvm-dwarfdump -debug-info=0x0000000b --show-children - \
19RUN:   | FileCheck %s --check-prefix=CHILDREN
20CHILDREN: .debug_info contents:
21CHILDREN: 0x0000000b: DW_TAG_compile_unit
22CHILDREN: DW_TAG_subprogram
23
24RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
25RUN:   | llvm-dwarfdump -debug-info=0x0000000b -c -r 0 - \
26RUN:   | FileCheck %s
27
28RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
29RUN:   | llvm-dwarfdump -debug-info=0x0000000b -c -r 1 - \
30RUN:   | FileCheck %s --check-prefix=CHILDREN
31
32RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
33RUN:   | llvm-dwarfdump -debug-info=0x0000000b -c -recurse-depth 0 - \
34RUN:   | FileCheck %s
35
36RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
37RUN:   | llvm-dwarfdump -debug-info=0x0000000b -c -recurse-depth 1 - \
38RUN:   | FileCheck %s --check-prefix=CHILDREN
39
40RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
41RUN:   | llvm-dwarfdump -debug-info=0x00000043 --show-parents - \
42RUN:   | FileCheck %s --check-prefix=PARENTS
43
44RUN: llvm-mc %S/brief.s -filetype obj -triple x86_64-apple-darwin -o - \
45RUN:   | llvm-dwarfdump -debug-info=0x00000043 -p - \
46RUN:   | FileCheck %s --check-prefix=PARENTS
47PARENTS: .debug_info contents:
48PARENTS: 0x0000000b:{{ }}DW_TAG_compile_unit
49PARENTS:                   DW_AT_name
50PARENTS-NOT: {{:}}
51PARENTS: 0x00000043:{{   }}DW_TAG_base_type
52PARENTS:                     DW_AT_name
53PARENTS-NOT: {{:}}
54