File: dwarf4-types.test

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (64 lines) | stat: -rw-r--r-- 3,201 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# REQUIRES: system-linux

# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-main.s -o %tmain.o
# RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-types-helper.s -o %thelper.o
# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt | FileCheck --check-prefix=POSTCHECK %s
# RUN: llvm-dwarfdump --show-form --verbose --debug-types %t.bolt | FileCheck --check-prefix=POSTCHECKTU %s

# Check BOLT handles DWARF4/5 with fdebug-types.

# POSTCHECK: version = 0x0004
# POSTCHECK: DW_TAG_compile_unit [6]
# POSTCHECK: DW_TAG_subprogram [7]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x0000007c} "int")
# POSTCHECK: DW_TAG_formal_parameter [8]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x007c => {0x0000007c} "int")
# POSTCHECK: DW_TAG_formal_parameter [8]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0083 => {0x00000083} "char **")
# POSTCHECK: DW_TAG_variable [9]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0094 => {0x00000094} "Foo")
# POSTCHECK: DW_TAG_base_type [5]
# POSTCHECK: DW_TAG_pointer_type [4]

# POSTCHECK: version = 0x0004
# POSTCHECK: DW_TAG_compile_unit [6]
# POSTCHECK: DW_TAG_subprogram [11]
# POSTCHECK: DW_TAG_variable [9]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x006b => {0x00000112} "Foo2a")
# POSTCHECK: DW_TAG_variable [9]
# POSTCHECK: DW_AT_type [DW_FORM_ref4] (cu + 0x0074 => {0x0000011b} "Foo3")
# POSTCHECK: DW_TAG_base_type [5]
# POSTCHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "int")
# POSTCHECK: DW_TAG_structure_type [10]
# POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0x104ec427d2ebea6f)
# POSTCHECK: DW_TAG_structure_type [10]
# POSTCHECK: DW_AT_signature [DW_FORM_ref_sig8]  (0xb4580bc1535df1e4)

# POSTCHECKTU: version = 0x0004
# POSTCHECKTU-SAME: type_signature = 0x675d23e4f33235f2
# POSTCHECKTU-SAME: type_offset = 0x001e
# POSTCHECKTU: DW_TAG_type_unit [1]
# POSTCHECKTU: DW_TAG_member [3]
# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x0000004c} "char *")
# POSTCHECKTU: DW_TAG_member [3]
# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x004c => {0x0000004c} "char *")
# POSTCHECKTU: DW_TAG_pointer_type [4]
# POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0051 => {0x00000051} "char")
# POSTCHECKTU: DW_TAG_base_type [5]
# POSTCHECKTU: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")

# POSTCHECKTU: version = 0x0004
# POSTCHECKTU-SAME: type_signature = 0x49dc260088be7e56
# POSTCHECKTU-SAME: type_offset = 0x001e
# POSTCHECKTU: DW_TAG_type_unit [1]
# POSTCHECKTU: DW_TAG_structure_type [2]
# POSTCHECKTU: DW_TAG_member [3]
# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x00000099} "char *")
# POSTCHECKTU: DW_TAG_member [3]
# POSTCHECKTU: DW_AT_type [DW_FORM_ref4] (cu + 0x0040 => {0x00000099} "char *")
# POSTCHECKTU: DW_TAG_pointer_type [4]
# POSTCHECKTU-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x0045 => {0x0000009e} "char")
# POSTCHECKTU: DW_TAG_base_type [5]
# POSTCHECKTU-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]+}}] = "char")