xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/gnu_call_site.s (revision ea83e0b17ecf5dc0cf228afb334aa72ce9b5aec1)
1# RUN: llvm-mc %s -filetype obj -triple i686-pc-linux -o %t
2# RUN: llvm-dwarfdump %t | FileCheck %s
3
4# CHECK:      DW_TAG_subprogram
5# CHECK-NEXT:   DW_AT_external  (true)
6# CHECK-NEXT:   DW_AT_name      ("fn4")
7# CHECK-NEXT:   DW_AT_linkage_name      ("test")
8# CHECK-NEXT:   DW_AT_low_pc    (0x00000000)
9# CHECK-NEXT:   DW_AT_high_pc   (0x00000000)
10# CHECK-NEXT:   DW_AT_frame_base        (DW_OP_call_frame_cfa)
11# CHECK-NEXT:   DW_AT_GNU_all_call_sites        (true)
12
13# CHECK:      DW_TAG_GNU_call_site
14# CHECK-NEXT:   DW_AT_low_pc  (0x00000000)
15# CHECK-NEXT:   DW_AT_abstract_origin (0x00000021 "test")
16
17# CHECK:      DW_TAG_GNU_call_site_parameter
18# CHECK-NEXT:   DW_AT_location      (DW_OP_reg0 EAX)
19# CHECK-NEXT:   DW_AT_GNU_call_site_value   (DW_OP_addr 0x0)
20
21.section  .debug_info,"",@progbits
22  .long  0x47
23  .value  0x4
24  .long  0
25  .byte  0x4
26
27  .uleb128 0x1 # DW_TAG_compile_unit [1]
28  .long  0
29  .byte  0x0
30  .long  0
31  .long  0
32  .long  0
33  .long  0
34
35  .uleb128 0xe # DW_TAG_subprogram [14]
36  .string  "fn4"
37  .long  0
38  .long  0
39  .long  0
40  .uleb128 0x1  # DW_AT_GNU_all_call_sites
41  .byte  0x9c
42
43  .uleb128 0x12 # DW_TAG_GNU_call_site [18]
44  .long  0x0
45  .long  0x21
46
47  .uleb128 0x13 # DW_TAG_GNU_call_site_parameter [19]
48  .uleb128 0x1
49  .byte  0x50
50  .uleb128 0x5
51  .byte  0x3
52  .long  X
53  .byte  0
54  .byte  0
55  .byte  0
56
57  .byte  0
58  .byte  0
59
60.section .debug_abbrev,"",@progbits
61  .uleb128 0x1
62  .uleb128 0x11   # DW_TAG_compile_unit, DW_CHILDREN_yes
63  .byte  0x1
64  .uleb128 0x25   # DW_AT_producer, DW_FORM_strp
65  .uleb128 0xe
66  .uleb128 0x13   # DW_AT_language, DW_FORM_data1
67  .uleb128 0xb
68  .uleb128 0x3    # DW_AT_name, DW_FORM_strp
69  .uleb128 0xe
70  .uleb128 0x1b   # DW_AT_comp_dir, DW_FORM_strp
71  .uleb128 0xe
72  .uleb128 0x11   # DW_AT_low_pc, DW_FORM_addr
73  .uleb128 0x1
74  .uleb128 0x12   # DW_AT_high_pc, DW_FORM_data4
75  .uleb128 0x6
76  .byte  0
77  .byte  0
78
79  .uleb128 0xe    # [14]
80  .uleb128 0x2e   # DW_TAG_subprogram, DW_CHILDREN_yes
81  .byte  0x1
82  .uleb128 0x3f   # DW_AT_external, DW_FORM_flag_present
83  .uleb128 0x19
84  .uleb128 0x3    # DW_AT_name, DW_FORM_string
85  .uleb128 0x8
86  .uleb128 0x6e   # DW_AT_linkage_name, DW_FORM_strp
87  .uleb128 0xe
88  .uleb128 0x11   # DW_AT_low_pc, DW_FORM_addr
89  .uleb128 0x1
90  .uleb128 0x12   # DW_AT_high_pc, DW_FORM_data4
91  .uleb128 0x6
92  .uleb128 0x40   # DW_AT_frame_base, DW_FORM_exprloc
93  .uleb128 0x18
94  .uleb128 0x2117 # DW_AT_GNU_all_call_sites, DW_FORM_flag_present
95  .uleb128 0x19
96  .byte  0
97  .byte  0
98
99  .uleb128 0x12   # [18]
100  .uleb128 0x4109 # DW_TAG_GNU_call_site, DW_CHILDREN_yes
101  .byte  0x1
102  .uleb128 0x11   # DW_AT_low_pc, DW_FORM_addr
103  .uleb128 0x1
104  .uleb128 0x31   # DW_AT_abstract_origin, DW_FORM_ref4
105  .uleb128 0x13
106  .byte  0
107  .byte  0
108
109  .uleb128 0x13   # [19]
110  .uleb128 0x410a # DW_TAG_GNU_call_site_parameter, DW_CHILDREN_no
111  .byte  0
112  .uleb128 0x2    # DW_AT_location, DW_FORM_exprloc
113  .uleb128 0x18
114  .uleb128 0x2111 # DW_AT_GNU_call_site_value, DW_FORM_exprloc
115  .uleb128 0x18
116  .byte  0
117  .byte  0
118  .byte  0
119
120.section .debug_str,"MS",@progbits,1
121.string "test"
122