1
2
3
4 package dwarf
5
6 var putvarAbbrevs = []dwAbbrev{
7 {
8 DW_TAG_variable,
9 DW_CHILDREN_no,
10 []dwAttrForm{
11 {DW_AT_name, DW_FORM_string},
12 {DW_AT_decl_line, DW_FORM_udata},
13 {DW_AT_type, DW_FORM_ref_addr},
14 },
15 },
16 {
17 DW_TAG_formal_parameter,
18 DW_CHILDREN_no,
19 []dwAttrForm{
20 {DW_AT_name, DW_FORM_string},
21 {DW_AT_variable_parameter, DW_FORM_flag},
22 {DW_AT_type, DW_FORM_ref_addr},
23 },
24 },
25 {
26 DW_TAG_variable,
27 DW_CHILDREN_no,
28 []dwAttrForm{
29 {DW_AT_abstract_origin, DW_FORM_ref_addr},
30 {DW_AT_location, DW_FORM_sec_offset},
31 },
32 },
33 {
34 DW_TAG_variable,
35 DW_CHILDREN_no,
36 []dwAttrForm{
37 {DW_AT_abstract_origin, DW_FORM_ref_addr},
38 {DW_AT_location, DW_FORM_block1},
39 },
40 },
41 {
42 DW_TAG_variable,
43 DW_CHILDREN_no,
44 []dwAttrForm{
45 {DW_AT_name, DW_FORM_string},
46 {DW_AT_decl_line, DW_FORM_udata},
47 {DW_AT_type, DW_FORM_ref_addr},
48 {DW_AT_go_closure_offset, DW_FORM_udata},
49 {DW_AT_location, DW_FORM_sec_offset},
50 },
51 },
52 {
53 DW_TAG_variable,
54 DW_CHILDREN_no,
55 []dwAttrForm{
56 {DW_AT_name, DW_FORM_string},
57 {DW_AT_decl_line, DW_FORM_udata},
58 {DW_AT_type, DW_FORM_ref_addr},
59 {DW_AT_go_closure_offset, DW_FORM_udata},
60 {DW_AT_location, DW_FORM_block1},
61 },
62 },
63 {
64 DW_TAG_variable,
65 DW_CHILDREN_no,
66 []dwAttrForm{
67 {DW_AT_name, DW_FORM_string},
68 {DW_AT_decl_line, DW_FORM_udata},
69 {DW_AT_type, DW_FORM_ref_addr},
70 {DW_AT_location, DW_FORM_sec_offset},
71 },
72 },
73 {
74 DW_TAG_variable,
75 DW_CHILDREN_no,
76 []dwAttrForm{
77 {DW_AT_name, DW_FORM_string},
78 {DW_AT_decl_line, DW_FORM_udata},
79 {DW_AT_type, DW_FORM_ref_addr},
80 {DW_AT_location, DW_FORM_block1},
81 },
82 },
83 {
84 DW_TAG_formal_parameter,
85 DW_CHILDREN_no,
86 []dwAttrForm{
87 {DW_AT_abstract_origin, DW_FORM_ref_addr},
88 {DW_AT_location, DW_FORM_sec_offset},
89 },
90 },
91 {
92 DW_TAG_formal_parameter,
93 DW_CHILDREN_no,
94 []dwAttrForm{
95 {DW_AT_abstract_origin, DW_FORM_ref_addr},
96 {DW_AT_location, DW_FORM_block1},
97 },
98 },
99 {
100 DW_TAG_formal_parameter,
101 DW_CHILDREN_no,
102 []dwAttrForm{
103 {DW_AT_name, DW_FORM_string},
104 {DW_AT_variable_parameter, DW_FORM_flag},
105 {DW_AT_decl_line, DW_FORM_udata},
106 {DW_AT_type, DW_FORM_ref_addr},
107 {DW_AT_go_closure_offset, DW_FORM_udata},
108 {DW_AT_location, DW_FORM_sec_offset},
109 },
110 },
111 {
112 DW_TAG_formal_parameter,
113 DW_CHILDREN_no,
114 []dwAttrForm{
115 {DW_AT_name, DW_FORM_string},
116 {DW_AT_variable_parameter, DW_FORM_flag},
117 {DW_AT_decl_line, DW_FORM_udata},
118 {DW_AT_type, DW_FORM_ref_addr},
119 {DW_AT_go_closure_offset, DW_FORM_udata},
120 {DW_AT_location, DW_FORM_block1},
121 },
122 },
123 {
124 DW_TAG_formal_parameter,
125 DW_CHILDREN_no,
126 []dwAttrForm{
127 {DW_AT_name, DW_FORM_string},
128 {DW_AT_variable_parameter, DW_FORM_flag},
129 {DW_AT_decl_line, DW_FORM_udata},
130 {DW_AT_type, DW_FORM_ref_addr},
131 {DW_AT_location, DW_FORM_sec_offset},
132 },
133 },
134 {
135 DW_TAG_formal_parameter,
136 DW_CHILDREN_no,
137 []dwAttrForm{
138 {DW_AT_name, DW_FORM_string},
139 {DW_AT_variable_parameter, DW_FORM_flag},
140 {DW_AT_decl_line, DW_FORM_udata},
141 {DW_AT_type, DW_FORM_ref_addr},
142 {DW_AT_location, DW_FORM_block1},
143 },
144 },
145 }
146
147 func putAbstractVarAbbrev(v *Var) int {
148 if v.Tag == DW_TAG_variable {
149 return DW_ABRV_PUTVAR_START + 0
150 } else {
151 return DW_ABRV_PUTVAR_START + 1
152 }
153 }
154
155 func putvarAbbrev(v *Var, concrete, withLoclist bool) int {
156 if v.Tag == DW_TAG_variable {
157 if concrete {
158 if withLoclist {
159 return DW_ABRV_PUTVAR_START + 2
160 } else {
161 return DW_ABRV_PUTVAR_START + 3
162 }
163 } else {
164 if v.ClosureOffset > 0 {
165 if withLoclist {
166 return DW_ABRV_PUTVAR_START + 4
167 } else {
168 return DW_ABRV_PUTVAR_START + 5
169 }
170 } else {
171 if withLoclist {
172 return DW_ABRV_PUTVAR_START + 6
173 } else {
174 return DW_ABRV_PUTVAR_START + 7
175 }
176 }
177 }
178 } else {
179 if concrete {
180 if withLoclist {
181 return DW_ABRV_PUTVAR_START + 8
182 } else {
183 return DW_ABRV_PUTVAR_START + 9
184 }
185 } else {
186 if v.ClosureOffset > 0 {
187 if withLoclist {
188 return DW_ABRV_PUTVAR_START + 10
189 } else {
190 return DW_ABRV_PUTVAR_START + 11
191 }
192 } else {
193 if withLoclist {
194 return DW_ABRV_PUTVAR_START + 12
195 } else {
196 return DW_ABRV_PUTVAR_START + 13
197 }
198 }
199 }
200 }
201 }
202
View as plain text