2 * Copyright (c) 2007 John Birrell (jb@freebsd.org)
3 * Copyright (c) 2009 Kai Wang
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 #include "_libdwarf.h"
30 ELFTC_VCSID("$Id: dwarf_dump.c 3749 2019-06-28 01:10:44Z emaste $");
33 dwarf_get_ACCESS_name(unsigned access, const char **s)
39 case DW_ACCESS_public:
40 *s = "DW_ACCESS_public"; break;
41 case DW_ACCESS_protected:
42 *s = "DW_ACCESS_protected"; break;
43 case DW_ACCESS_private:
44 *s = "DW_ACCESS_private"; break;
46 return (DW_DLV_NO_ENTRY);
53 dwarf_get_AT_name(unsigned attr, const char **s)
59 case DW_AT_abstract_origin:
60 *s = "DW_AT_abstract_origin"; break;
61 case DW_AT_accessibility:
62 *s = "DW_AT_accessibility"; break;
63 case DW_AT_address_class:
64 *s = "DW_AT_address_class"; break;
65 case DW_AT_artificial:
66 *s = "DW_AT_artificial"; break;
68 *s = "DW_AT_allocated"; break;
69 case DW_AT_associated:
70 *s = "DW_AT_associated"; break;
71 case DW_AT_base_types:
72 *s = "DW_AT_base_types"; break;
73 case DW_AT_binary_scale:
74 *s = "DW_AT_binary_scale"; break;
75 case DW_AT_bit_offset:
76 *s = "DW_AT_bit_offset"; break;
78 *s = "DW_AT_bit_size"; break;
79 case DW_AT_bit_stride:
80 *s = "DW_AT_bit_stride"; break;
82 *s = "DW_AT_byte_size"; break;
83 case DW_AT_byte_stride:
84 *s = "DW_AT_byte_stride"; break;
85 case DW_AT_calling_convention:
86 *s = "DW_AT_calling_convention"; break;
87 case DW_AT_common_reference:
88 *s = "DW_AT_common_reference"; break;
90 *s = "DW_AT_comp_dir"; break;
91 case DW_AT_const_expr:
92 *s = "DW_AT_const_expr"; break;
93 case DW_AT_const_value:
94 *s = "DW_AT_const_value"; break;
95 case DW_AT_containing_type:
96 *s = "DW_AT_containing_type"; break;
98 *s = "DW_AT_count"; break;
99 case DW_AT_call_column:
100 *s = "DW_AT_call_column"; break;
101 case DW_AT_call_file:
102 *s = "DW_AT_call_file"; break;
103 case DW_AT_call_line:
104 *s = "DW_AT_call_line"; break;
105 case DW_AT_data_bit_offset:
106 *s = "DW_AT_data_bit_offset"; break;
107 case DW_AT_data_location:
108 *s = "DW_AT_data_location"; break;
109 case DW_AT_data_member_location:
110 *s = "DW_AT_data_member_location"; break;
111 case DW_AT_decl_column:
112 *s = "DW_AT_decl_column"; break;
113 case DW_AT_decl_file:
114 *s = "DW_AT_decl_file"; break;
115 case DW_AT_decl_line:
116 *s = "DW_AT_decl_line"; break;
117 case DW_AT_declaration:
118 *s = "DW_AT_declaration"; break;
119 case DW_AT_default_value:
120 *s = "DW_AT_default_value"; break;
121 case DW_AT_decimal_scale:
122 *s = "DW_AT_decimal_scale"; break;
123 case DW_AT_decimal_sign:
124 *s = "DW_AT_decimal_sign"; break;
125 case DW_AT_description:
126 *s = "DW_AT_description"; break;
127 case DW_AT_digit_count:
128 *s = "DW_AT_digit_count"; break;
130 *s = "DW_AT_discr"; break;
131 case DW_AT_discr_list:
132 *s = "DW_AT_discr_list"; break;
133 case DW_AT_discr_value:
134 *s = "DW_AT_discr_value"; break;
135 case DW_AT_element_list:
136 *s = "DW_AT_element_list"; break;
138 *s = "DW_AT_encoding"; break;
139 case DW_AT_enum_class:
140 *s = "DW_AT_enum_class"; break;
142 *s = "DW_AT_external"; break;
144 *s = "DW_AT_entry_pc"; break;
145 case DW_AT_extension:
146 *s = "DW_AT_extension"; break;
148 *s = "DW_AT_explicit"; break;
149 case DW_AT_endianity:
150 *s = "DW_AT_endianity"; break;
151 case DW_AT_elemental:
152 *s = "DW_AT_elemental"; break;
153 case DW_AT_frame_base:
154 *s = "DW_AT_frame_base"; break;
156 *s = "DW_AT_friend"; break;
158 *s = "DW_AT_high_pc"; break;
160 *s = "DW_AT_hi_user"; break;
161 case DW_AT_identifier_case:
162 *s = "DW_AT_identifier_case"; break;
164 *s = "DW_AT_import"; break;
166 *s = "DW_AT_inline"; break;
167 case DW_AT_is_optional:
168 *s = "DW_AT_is_optional"; break;
170 *s = "DW_AT_language"; break;
171 case DW_AT_linkage_name:
172 *s = "DW_AT_linkage_name"; break;
174 *s = "DW_AT_lo_user"; break;
176 *s = "DW_AT_location"; break;
178 *s = "DW_AT_low_pc"; break;
179 case DW_AT_lower_bound:
180 *s = "DW_AT_lower_bound"; break;
181 case DW_AT_macro_info:
182 *s = "DW_AT_macro_info"; break;
183 case DW_AT_main_subprogram:
184 *s = "DW_AT_main_subprogram"; break;
186 *s = "DW_AT_mutable"; break;
188 *s = "DW_AT_member"; break;
190 *s = "DW_AT_name"; break;
191 case DW_AT_namelist_item:
192 *s = "DW_AT_namelist_item"; break;
194 *s = "DW_AT_ordering"; break;
195 case DW_AT_object_pointer:
196 *s = "DW_AT_object_pointer"; break;
198 *s = "DW_AT_priority"; break;
200 *s = "DW_AT_producer"; break;
201 case DW_AT_prototyped:
202 *s = "DW_AT_prototyped"; break;
203 case DW_AT_picture_string:
204 *s = "DW_AT_picture_string"; break;
206 *s = "DW_AT_pure"; break;
207 case DW_AT_return_addr:
208 *s = "DW_AT_return_addr"; break;
210 *s = "DW_AT_ranges"; break;
211 case DW_AT_recursive:
212 *s = "DW_AT_recursive"; break;
214 *s = "DW_AT_segment"; break;
216 *s = "DW_AT_sibling"; break;
217 case DW_AT_signature:
218 *s = "DW_AT_signature"; break;
219 case DW_AT_specification:
220 *s = "DW_AT_specification"; break;
221 case DW_AT_start_scope:
222 *s = "DW_AT_start_scope"; break;
223 case DW_AT_static_link:
224 *s = "DW_AT_static_link"; break;
225 case DW_AT_stmt_list:
226 *s = "DW_AT_stmt_list"; break;
227 case DW_AT_string_length:
228 *s = "DW_AT_string_length"; break;
229 case DW_AT_subscr_data:
230 *s = "DW_AT_subscr_data"; break;
232 *s = "DW_AT_small"; break;
234 *s = "DW_AT_type"; break;
235 case DW_AT_trampoline:
236 *s = "DW_AT_trampoline"; break;
237 case DW_AT_threads_scaled:
238 *s = "DW_AT_threads_scaled"; break;
239 case DW_AT_upper_bound:
240 *s = "DW_AT_upper_bound"; break;
241 case DW_AT_use_location:
242 *s = "DW_AT_use_location"; break;
244 *s = "DW_AT_use_UTF8"; break;
245 case DW_AT_variable_parameter:
246 *s = "DW_AT_variable_parameter"; break;
247 case DW_AT_virtuality:
248 *s = "DW_AT_virtuality"; break;
249 case DW_AT_visibility:
250 *s = "DW_AT_visibility"; break;
251 case DW_AT_vtable_elem_location:
252 *s = "DW_AT_vtable_elem_location"; break;
253 case DW_AT_string_length_bit_size:
254 *s = "DW_AT_string_length_bit_size"; break;
255 case DW_AT_string_length_byte_size:
256 *s = "DW_AT_string_length_byte_size"; break;
258 *s = "DW_AT_rank"; break;
259 case DW_AT_str_offsets_base:
260 *s = "DW_AT_str_offsets_base"; break;
261 case DW_AT_addr_base:
262 *s = "DW_AT_addr_base"; break;
263 case DW_AT_rnglists_base:
264 *s = "DW_AT_rnglists_base"; break;
266 *s = "DW_AT_dwo_name"; break;
267 case DW_AT_reference:
268 *s = "DW_AT_reference"; break;
269 case DW_AT_rvalue_reference:
270 *s = "DW_AT_rvalue_reference"; break;
272 *s = "DW_AT_macros"; break;
273 case DW_AT_call_all_calls:
274 *s = "DW_AT_call_all_calls"; break;
275 case DW_AT_call_all_source_calls:
276 *s = "DW_AT_call_all_source_calls"; break;
277 case DW_AT_call_all_tail_calls:
278 *s = "DW_AT_call_all_tail_calls"; break;
279 case DW_AT_call_return_pc:
280 *s = "DW_AT_call_return_pc"; break;
281 case DW_AT_call_value:
282 *s = "DW_AT_call_value"; break;
283 case DW_AT_call_origin:
284 *s = "DW_AT_call_origin"; break;
285 case DW_AT_call_parameter:
286 *s = "DW_AT_call_parameter"; break;
288 *s = "DW_AT_call_pc"; break;
289 case DW_AT_call_tail_call:
290 *s = "DW_AT_call_tail_call"; break;
291 case DW_AT_call_target:
292 *s = "DW_AT_call_target"; break;
293 case DW_AT_call_target_clobbered:
294 *s = "DW_AT_call_target_clobbered"; break;
295 case DW_AT_call_data_location:
296 *s = "DW_AT_call_data_location"; break;
297 case DW_AT_call_data_value:
298 *s = "DW_AT_call_data_value"; break;
300 *s = "DW_AT_noreturn"; break;
301 case DW_AT_alignment:
302 *s = "DW_AT_alignment"; break;
303 case DW_AT_export_symbols:
304 *s = "DW_AT_export_symbols"; break;
306 *s = "DW_AT_deleted"; break;
307 case DW_AT_defaulted:
308 *s = "DW_AT_defaulted"; break;
309 case DW_AT_loclists_base:
310 *s = "DW_AT_loclists_base"; break;
312 *s = "DW_AT_sf_names"; break;
314 *s = "DW_AT_src_info"; break;
316 *s = "DW_AT_mac_info"; break;
317 case DW_AT_src_coords:
318 *s = "DW_AT_src_coords"; break;
319 case DW_AT_body_begin:
320 *s = "DW_AT_body_begin"; break;
322 *s = "DW_AT_body_end"; break;
324 *s = "DW_AT_MIPS_fde"; break;
325 case DW_AT_MIPS_loop_begin:
326 *s = "DW_AT_MIPS_loop_begin"; break;
327 case DW_AT_MIPS_tail_loop_begin:
328 *s = "DW_AT_MIPS_tail_loop_begin"; break;
329 case DW_AT_MIPS_epilog_begin:
330 *s = "DW_AT_MIPS_epilog_begin"; break;
331 case DW_AT_MIPS_loop_unroll_factor:
332 *s = "DW_AT_MIPS_loop_unroll_factor"; break;
333 case DW_AT_MIPS_software_pipeline_depth:
334 *s = "DW_AT_MIPS_software_pipeline_depth"; break;
335 case DW_AT_MIPS_linkage_name:
336 *s = "DW_AT_MIPS_linkage_name"; break;
337 case DW_AT_MIPS_stride:
338 *s = "DW_AT_MIPS_stride"; break;
339 case DW_AT_MIPS_abstract_name:
340 *s = "DW_AT_MIPS_abstract_name"; break;
341 case DW_AT_MIPS_clone_origin:
342 *s = "DW_AT_MIPS_clone_origin"; break;
343 case DW_AT_MIPS_has_inlines:
344 *s = "DW_AT_MIPS_has_inlines"; break;
345 case DW_AT_MIPS_stride_byte:
346 *s = "DW_AT_MIPS_stride_byte"; break;
347 case DW_AT_MIPS_stride_elem:
348 *s = "DW_AT_MIPS_stride_elem"; break;
349 case DW_AT_MIPS_ptr_dopetype:
350 *s = "DW_AT_MIPS_ptr_dopetype"; break;
351 case DW_AT_MIPS_allocatable_dopetype:
352 *s = "DW_AT_MIPS_allocatable_dopetype"; break;
353 case DW_AT_MIPS_assumed_shape_dopetype:
354 *s = "DW_AT_MIPS_assumed_shape_dopetype"; break;
355 case DW_AT_MIPS_assumed_size:
356 *s = "DW_AT_MIPS_assumed_size"; break;
357 case DW_AT_GNU_vector:
358 *s = "DW_AT_GNU_vector"; break;
359 case DW_AT_GNU_guarded_by:
360 *s = "DW_AT_GNU_guarded_by"; break;
361 case DW_AT_GNU_pt_guarded_by:
362 *s = "DW_AT_GNU_pt_guarded_by"; break;
363 case DW_AT_GNU_guarded:
364 *s = "DW_AT_GNU_guarded"; break;
365 case DW_AT_GNU_pt_guarded:
366 *s = "DW_AT_GNU_pt_guarded"; break;
367 case DW_AT_GNU_locks_excluded:
368 *s = "DW_AT_GNU_locks_excluded"; break;
369 case DW_AT_GNU_exclusive_locks_required:
370 *s = "DW_AT_GNU_exclusive_locks_required"; break;
371 case DW_AT_GNU_shared_locks_required:
372 *s = "DW_AT_GNU_shared_locks_required"; break;
373 case DW_AT_GNU_odr_signature:
374 *s = "DW_AT_GNU_odr_signature"; break;
375 case DW_AT_GNU_template_name:
376 *s = "DW_AT_GNU_template_name"; break;
377 case DW_AT_GNU_call_site_value:
378 *s = "DW_AT_GNU_call_site_value"; break;
379 case DW_AT_GNU_call_site_data_value:
380 *s = "DW_AT_GNU_call_site_data_value"; break;
381 case DW_AT_GNU_call_site_target:
382 *s = "DW_AT_GNU_call_site_target"; break;
383 case DW_AT_GNU_call_site_target_clobbered:
384 *s = "DW_AT_GNU_call_site_target_clobbered"; break;
385 case DW_AT_GNU_tail_call:
386 *s = "DW_AT_GNU_tail_call"; break;
387 case DW_AT_GNU_all_tail_call_sites:
388 *s = "DW_AT_GNU_all_tail_call_sites"; break;
389 case DW_AT_GNU_all_call_sites:
390 *s = "DW_AT_GNU_all_call_sites"; break;
391 case DW_AT_GNU_all_source_call_sites:
392 *s = "DW_AT_GNU_all_source_call_sites"; break;
393 case DW_AT_APPLE_optimized:
394 *s = "DW_AT_APPLE_optimized"; break;
395 case DW_AT_APPLE_flags:
396 *s = "DW_AT_APPLE_flags"; break;
397 case DW_AT_APPLE_isa:
398 *s = "DW_AT_APPLE_isa"; break;
399 case DW_AT_APPLE_block:
400 *s = "DW_AT_APPLE_block"; break;
401 case DW_AT_APPLE_major_runtime_vers:
402 *s = "DW_AT_APPLE_major_runtime_vers"; break;
403 case DW_AT_APPLE_runtime_class:
404 *s = "DW_AT_APPLE_runtime_class"; break;
405 case DW_AT_APPLE_omit_frame_ptr:
406 *s = "DW_AT_APPLE_omit_frame_ptr"; break;
407 case DW_AT_APPLE_property_name:
408 *s = "DW_AT_APPLE_property_name"; break;
409 case DW_AT_APPLE_property_getter:
410 *s = "DW_AT_APPLE_property_getter"; break;
411 case DW_AT_APPLE_property_setter:
412 *s = "DW_AT_APPLE_property_setter"; break;
413 case DW_AT_APPLE_property_attribute:
414 *s = "DW_AT_APPLE_property_attribute"; break;
415 case DW_AT_APPLE_objc_complete_type:
416 *s = "DW_AT_APPLE_objc_complete_type"; break;
417 case DW_AT_APPLE_property:
418 *s = "DW_AT_APPLE_property"; break;
420 return (DW_DLV_NO_ENTRY);
427 dwarf_get_ATE_name(unsigned ate, const char **s)
434 *s = "DW_ATE_address"; break;
436 *s = "DW_ATE_boolean"; break;
437 case DW_ATE_complex_float:
438 *s = "DW_ATE_complex_float"; break;
440 *s = "DW_ATE_float"; break;
442 *s = "DW_ATE_signed"; break;
443 case DW_ATE_signed_char:
444 *s = "DW_ATE_signed_char"; break;
445 case DW_ATE_unsigned:
446 *s = "DW_ATE_unsigned"; break;
447 case DW_ATE_unsigned_char:
448 *s = "DW_ATE_unsigned_char"; break;
449 case DW_ATE_imaginary_float:
450 *s = "DW_ATE_imaginary_float"; break;
451 case DW_ATE_packed_decimal:
452 *s = "DW_ATE_packed_decimal"; break;
453 case DW_ATE_numeric_string:
454 *s = "DW_ATE_numeric_string"; break;
456 *s = "DW_ATE_edited"; break;
457 case DW_ATE_signed_fixed:
458 *s = "DW_ATE_signed_fixed"; break;
459 case DW_ATE_unsigned_fixed:
460 *s = "DW_ATE_unsigned_fixed"; break;
461 case DW_ATE_decimal_float:
462 *s = "DW_ATE_decimal_float"; break;
464 *s = "DW_ATE_UTF"; break;
466 *s = "DW_ATE_UCS"; break;
468 *s = "DW_ATE_ASCII"; break;
470 *s = "DW_ATE_lo_user"; break;
472 *s = "DW_ATE_hi_user"; break;
474 return (DW_DLV_NO_ENTRY);
481 dwarf_get_CC_name(unsigned cc, const char **s)
488 *s = "DW_CC_normal"; break;
490 *s = "DW_CC_program"; break;
492 *s = "DW_CC_nocall"; break;
493 case DW_CC_pass_by_reference:
494 *s = "DW_CC_pass_by_reference"; break;
495 case DW_CC_pass_by_value:
496 *s = "DW_CC_pass_by_value"; break;
498 *s = "DW_CC_lo_user"; break;
500 *s = "DW_CC_hi_user"; break;
502 return (DW_DLV_NO_ENTRY);
509 dwarf_get_CFA_name(unsigned cfa, const char **s)
515 case DW_CFA_advance_loc:
516 *s = "DW_CFA_advance_loc"; break;
518 *s = "DW_CFA_offset"; break;
520 *s = "DW_CFA_restore"; break;
522 *s = "DW_CFA_nop"; break;
524 *s = "DW_CFA_set_loc"; break;
525 case DW_CFA_advance_loc1:
526 *s = "DW_CFA_advance_loc1"; break;
527 case DW_CFA_advance_loc2:
528 *s = "DW_CFA_advance_loc2"; break;
529 case DW_CFA_advance_loc4:
530 *s = "DW_CFA_advance_loc4"; break;
531 case DW_CFA_offset_extended:
532 *s = "DW_CFA_offset_extended"; break;
533 case DW_CFA_restore_extended:
534 *s = "DW_CFA_restore_extended"; break;
535 case DW_CFA_undefined:
536 *s = "DW_CFA_undefined"; break;
537 case DW_CFA_same_value:
538 *s = "DW_CFA_same_value"; break;
539 case DW_CFA_register:
540 *s = "DW_CFA_register"; break;
541 case DW_CFA_remember_state:
542 *s = "DW_CFA_remember_state"; break;
543 case DW_CFA_restore_state:
544 *s = "DW_CFA_restore_state"; break;
546 *s = "DW_CFA_def_cfa"; break;
547 case DW_CFA_def_cfa_register:
548 *s = "DW_CFA_def_cfa_register"; break;
549 case DW_CFA_def_cfa_offset:
550 *s = "DW_CFA_def_cfa_offset"; break;
551 case DW_CFA_def_cfa_expression:
552 *s = "DW_CFA_def_cfa_expression"; break;
553 case DW_CFA_expression:
554 *s = "DW_CFA_expression"; break;
555 case DW_CFA_offset_extended_sf:
556 *s = "DW_CFA_offset_extended_sf"; break;
557 case DW_CFA_def_cfa_sf:
558 *s = "DW_CFA_def_cfa_sf"; break;
559 case DW_CFA_def_cfa_offset_sf:
560 *s = "DW_CFA_def_cfa_offset_sf"; break;
561 case DW_CFA_val_offset:
562 *s = "DW_CFA_val_offset"; break;
563 case DW_CFA_val_offset_sf:
564 *s = "DW_CFA_val_offset_sf"; break;
565 case DW_CFA_val_expression:
566 *s = "DW_CFA_val_expression"; break;
568 *s = "DW_CFA_lo_user"; break;
569 case DW_CFA_high_user:
570 *s = "DW_CFA_high_user"; break;
572 return (DW_DLV_NO_ENTRY);
579 dwarf_get_CHILDREN_name(unsigned children, const char **s)
586 *s = "DW_CHILDREN_no"; break;
587 case DW_CHILDREN_yes:
588 *s = "DW_CHILDREN_yes"; break;
590 return (DW_DLV_NO_ENTRY);
597 dwarf_get_FORM_name(unsigned form, const char **s)
604 *s = "DW_FORM_addr"; break;
606 *s = "DW_FORM_block"; break;
608 *s = "DW_FORM_block1"; break;
610 *s = "DW_FORM_block2"; break;
612 *s = "DW_FORM_block4"; break;
614 *s = "DW_FORM_data1"; break;
616 *s = "DW_FORM_data2"; break;
618 *s = "DW_FORM_data4"; break;
620 *s = "DW_FORM_data8"; break;
621 case DW_FORM_exprloc:
622 *s = "DW_FORM_exprloc"; break;
624 *s = "DW_FORM_flag"; break;
625 case DW_FORM_flag_present:
626 *s = "DW_FORM_flag_present"; break;
627 case DW_FORM_indirect:
628 *s = "DW_FORM_indirect"; break;
630 *s = "DW_FORM_ref1"; break;
632 *s = "DW_FORM_ref2"; break;
634 *s = "DW_FORM_ref4"; break;
636 *s = "DW_FORM_ref8"; break;
637 case DW_FORM_ref_addr:
638 *s = "DW_FORM_ref_addr"; break;
639 case DW_FORM_ref_sig8:
640 *s = "DW_FORM_ref_sig8"; break;
641 case DW_FORM_ref_udata:
642 *s = "DW_FORM_ref_udata"; break;
644 *s = "DW_FORM_sdata"; break;
645 case DW_FORM_sec_offset:
646 *s = "DW_FORM_sec_offset"; break;
648 *s = "DW_FORM_string"; break;
650 *s = "DW_FORM_strp"; break;
652 *s = "DW_FORM_udata"; break;
654 *s = "DW_FORM_strx"; break;
656 *s = "DW_FORM_addrx"; break;
657 case DW_FORM_ref_sup4:
658 *s = "DW_FORM_ref_sup4"; break;
659 case DW_FORM_strp_sup:
660 *s = "DW_FORM_strp_sup"; break;
662 *s = "DW_FORM_data16"; break;
663 case DW_FORM_line_strp:
664 *s = "DW_FORM_line_strp"; break;
665 case DW_FORM_implicit_const:
666 *s = "DW_FORM_implicit_const"; break;
667 case DW_FORM_loclistx:
668 *s = "DW_FORM_loclistx"; break;
669 case DW_FORM_rnglistx:
670 *s = "DW_FORM_rnglistx"; break;
671 case DW_FORM_ref_sup8:
672 *s = "DW_FORM_ref_sup8"; break;
673 case DW_FORM_ref_strx1:
674 *s = "DW_FORM_ref_strx1"; break;
675 case DW_FORM_ref_strx2:
676 *s = "DW_FORM_ref_strx2"; break;
677 case DW_FORM_ref_strx3:
678 *s = "DW_FORM_ref_strx3"; break;
679 case DW_FORM_ref_strx4:
680 *s = "DW_FORM_ref_strx4"; break;
681 case DW_FORM_ref_addrx1:
682 *s = "DW_FORM_ref_addrx1"; break;
683 case DW_FORM_ref_addrx2:
684 *s = "DW_FORM_ref_addrx2"; break;
685 case DW_FORM_ref_addrx3:
686 *s = "DW_FORM_ref_addrx3"; break;
687 case DW_FORM_ref_addrx4:
688 *s = "DW_FORM_ref_addrx4"; break;
690 return (DW_DLV_NO_ENTRY);
697 dwarf_get_DS_name(unsigned ds, const char **s)
704 *s = "DW_DS_unsigned"; break;
705 case DW_DS_leading_overpunch:
706 *s = "DW_DS_leading_overpunch"; break;
707 case DW_DS_trailing_overpunch:
708 *s = "DW_DS_trailing_overpunch"; break;
709 case DW_DS_leading_separate:
710 *s = "DW_DS_leading_separate"; break;
711 case DW_DS_trailing_separate:
712 *s = "DW_DS_trailing_separate"; break;
714 return (DW_DLV_NO_ENTRY);
721 dwarf_get_DSC_name(unsigned dsc, const char **s)
728 *s = "DW_DSC_label"; break;
730 *s = "DW_DSC_range"; break;
732 return (DW_DLV_NO_ENTRY);
739 dwarf_get_EH_name(unsigned eh, const char **s)
745 case DW_EH_PE_absptr:
746 *s = "DW_EH_PE_absptr"; break;
747 case DW_EH_PE_uleb128:
748 *s = "DW_EH_PE_uleb128"; break;
749 case DW_EH_PE_udata2:
750 *s = "DW_EH_PE_udata2"; break;
751 case DW_EH_PE_udata4:
752 *s = "DW_EH_PE_udata4"; break;
753 case DW_EH_PE_udata8:
754 *s = "DW_EH_PE_udata8"; break;
755 case DW_EH_PE_sleb128:
756 *s = "DW_EH_PE_sleb128"; break;
757 case DW_EH_PE_sdata2:
758 *s = "DW_EH_PE_sdata2"; break;
759 case DW_EH_PE_sdata4:
760 *s = "DW_EH_PE_sdata4"; break;
761 case DW_EH_PE_sdata8:
762 *s = "DW_EH_PE_sdata8"; break;
764 *s = "DW_EH_PE_pcrel"; break;
765 case DW_EH_PE_textrel:
766 *s = "DW_EH_PE_textrel"; break;
767 case DW_EH_PE_datarel:
768 *s = "DW_EH_PE_datarel"; break;
769 case DW_EH_PE_funcrel:
770 *s = "DW_EH_PE_funcrel"; break;
771 case DW_EH_PE_aligned:
772 *s = "DW_EH_PE_aligned"; break;
774 *s = "DW_EH_PE_omit"; break;
776 return (DW_DLV_NO_ENTRY);
783 dwarf_get_END_name(unsigned end, const char **s)
790 *s = "DW_END_default"; break;
792 *s = "DW_END_big"; break;
794 *s = "DW_END_little"; break;
796 *s = "DW_END_lo_user"; break;
797 case DW_END_high_user:
798 *s = "DW_END_high_user"; break;
800 return (DW_DLV_NO_ENTRY);
807 dwarf_get_ID_name(unsigned id, const char **s)
813 case DW_ID_case_sensitive:
814 *s = "DW_ID_case_sensitive"; break;
816 *s = "DW_ID_up_case"; break;
817 case DW_ID_down_case:
818 *s = "DW_ID_down_case"; break;
819 case DW_ID_case_insensitive:
820 *s = "DW_ID_case_insensitive"; break;
822 return (DW_DLV_NO_ENTRY);
829 dwarf_get_INL_name(unsigned inl, const char **s)
835 case DW_INL_not_inlined:
836 *s = "DW_INL_not_inlined"; break;
838 *s = "DW_INL_inlined"; break;
839 case DW_INL_declared_not_inlined:
840 *s = "DW_INL_declared_not_inlined"; break;
841 case DW_INL_declared_inlined:
842 *s = "DW_INL_declared_inlined"; break;
844 return (DW_DLV_NO_ENTRY);
851 dwarf_get_LANG_name(unsigned lang, const char **s)
858 *s = "DW_LANG_C89"; break;
860 *s = "DW_LANG_C"; break;
862 *s = "DW_LANG_Ada83"; break;
863 case DW_LANG_C_plus_plus:
864 *s = "DW_LANG_C_plus_plus"; break;
865 case DW_LANG_Cobol74:
866 *s = "DW_LANG_Cobol74"; break;
867 case DW_LANG_Cobol85:
868 *s = "DW_LANG_Cobol85"; break;
869 case DW_LANG_Fortran77:
870 *s = "DW_LANG_Fortran77"; break;
871 case DW_LANG_Fortran90:
872 *s = "DW_LANG_Fortran90"; break;
873 case DW_LANG_Pascal83:
874 *s = "DW_LANG_Pascal83"; break;
875 case DW_LANG_Modula2:
876 *s = "DW_LANG_Modula2"; break;
878 *s = "DW_LANG_Java"; break;
880 *s = "DW_LANG_C99"; break;
882 *s = "DW_LANG_Ada95"; break;
883 case DW_LANG_Fortran95:
884 *s = "DW_LANG_Fortran95"; break;
886 *s = "DW_LANG_PLI"; break;
888 *s = "DW_LANG_ObjC"; break;
889 case DW_LANG_ObjC_plus_plus:
890 *s = "DW_LANG_ObjC_plus_plus"; break;
892 *s = "DW_LANG_UPC"; break;
894 *s = "DW_LANG_D"; break;
896 *s = "DW_LANG_Python"; break;
898 *s = "DW_LANG_OpenCL"; break;
900 *s = "DW_LANG_Go"; break;
901 case DW_LANG_Modula3:
902 *s = "DW_LANG_Modula3"; break;
903 case DW_LANG_Haskell:
904 *s = "DW_LANG_Haskell"; break;
905 case DW_LANG_C_plus_plus_03:
906 *s = "DW_LANG_C_plus_plus_03"; break;
907 case DW_LANG_C_plus_plus_11:
908 *s = "DW_LANG_C_plus_plus_11"; break;
910 *s = "DW_LANG_OCaml"; break;
912 *s = "DW_LANG_Rust"; break;
914 *s = "DW_LANG_C11"; break;
916 *s = "DW_LANG_Swift"; break;
918 *s = "DW_LANG_Julia"; break;
920 *s = "DW_LANG_Dylan"; break;
921 case DW_LANG_C_plus_plus_14:
922 *s = "DW_LANG_C_plus_plus_14"; break;
923 case DW_LANG_Fortran03:
924 *s = "DW_LANG_Fortran03"; break;
925 case DW_LANG_Fortran08:
926 *s = "DW_LANG_Fortran08"; break;
927 case DW_LANG_RenderScript:
928 *s = "DW_LANG_RenderScript"; break;
930 *s = "DW_LANG_BLISS"; break;
931 case DW_LANG_lo_user:
932 *s = "DW_LANG_lo_user"; break;
933 case DW_LANG_Mips_Assembler:
934 *s = "DW_LANG_Mips_Assembler"; break;
935 case DW_LANG_hi_user:
936 *s = "DW_LANG_hi_user"; break;
938 return (DW_DLV_NO_ENTRY);
945 dwarf_get_LNE_name(unsigned lne, const char **s)
951 case DW_LNE_end_sequence:
952 *s = "DW_LNE_end_sequence"; break;
953 case DW_LNE_set_address:
954 *s = "DW_LNE_set_address"; break;
955 case DW_LNE_define_file:
956 *s = "DW_LNE_define_file"; break;
958 *s = "DW_LNE_lo_user"; break;
960 *s = "DW_LNE_hi_user"; break;
962 return (DW_DLV_NO_ENTRY);
969 dwarf_get_LNS_name(unsigned lns, const char **s)
976 *s = "DW_LNS_copy"; break;
977 case DW_LNS_advance_pc:
978 *s = "DW_LNS_advance_pc"; break;
979 case DW_LNS_advance_line:
980 *s = "DW_LNS_advance_line"; break;
981 case DW_LNS_set_file:
982 *s = "DW_LNS_set_file"; break;
983 case DW_LNS_set_column:
984 *s = "DW_LNS_set_column"; break;
985 case DW_LNS_negate_stmt:
986 *s = "DW_LNS_negate_stmt"; break;
987 case DW_LNS_set_basic_block:
988 *s = "DW_LNS_set_basic_block"; break;
989 case DW_LNS_const_add_pc:
990 *s = "DW_LNS_const_add_pc"; break;
991 case DW_LNS_fixed_advance_pc:
992 *s = "DW_LNS_fixed_advance_pc"; break;
993 case DW_LNS_set_prologue_end:
994 *s = "DW_LNS_set_prologue_end"; break;
995 case DW_LNS_set_epilogue_begin:
996 *s = "DW_LNS_set_epilogue_begin"; break;
998 *s = "DW_LNS_set_isa"; break;
1000 return (DW_DLV_NO_ENTRY);
1007 dwarf_get_MACINFO_name(unsigned mi, const char **s)
1013 case DW_MACINFO_define:
1014 *s = "DW_MACINFO_define"; break;
1015 case DW_MACINFO_undef:
1016 *s = "DW_MACINFO_undef"; break;
1017 case DW_MACINFO_start_file:
1018 *s = "DW_MACINFO_start_file"; break;
1019 case DW_MACINFO_end_file:
1020 *s = "DW_MACINFO_end_file"; break;
1021 case DW_MACINFO_vendor_ext:
1022 *s = "DW_MACINFO_vendor_ext"; break;
1024 return (DW_DLV_NO_ENTRY);
1031 dwarf_get_OP_name(unsigned op, const char **s)
1038 *s = "DW_OP_deref"; break;
1040 *s = "DW_OP_reg0"; break;
1042 *s = "DW_OP_reg1"; break;
1044 *s = "DW_OP_reg2"; break;
1046 *s = "DW_OP_reg3"; break;
1048 *s = "DW_OP_reg4"; break;
1050 *s = "DW_OP_reg5"; break;
1052 *s = "DW_OP_reg6"; break;
1054 *s = "DW_OP_reg7"; break;
1056 *s = "DW_OP_reg8"; break;
1058 *s = "DW_OP_reg9"; break;
1060 *s = "DW_OP_reg10"; break;
1062 *s = "DW_OP_reg11"; break;
1064 *s = "DW_OP_reg12"; break;
1066 *s = "DW_OP_reg13"; break;
1068 *s = "DW_OP_reg14"; break;
1070 *s = "DW_OP_reg15"; break;
1072 *s = "DW_OP_reg16"; break;
1074 *s = "DW_OP_reg17"; break;
1076 *s = "DW_OP_reg18"; break;
1078 *s = "DW_OP_reg19"; break;
1080 *s = "DW_OP_reg20"; break;
1082 *s = "DW_OP_reg21"; break;
1084 *s = "DW_OP_reg22"; break;
1086 *s = "DW_OP_reg23"; break;
1088 *s = "DW_OP_reg24"; break;
1090 *s = "DW_OP_reg25"; break;
1092 *s = "DW_OP_reg26"; break;
1094 *s = "DW_OP_reg27"; break;
1096 *s = "DW_OP_reg28"; break;
1098 *s = "DW_OP_reg29"; break;
1100 *s = "DW_OP_reg30"; break;
1102 *s = "DW_OP_reg31"; break;
1104 *s = "DW_OP_lit0"; break;
1106 *s = "DW_OP_lit1"; break;
1108 *s = "DW_OP_lit2"; break;
1110 *s = "DW_OP_lit3"; break;
1112 *s = "DW_OP_lit4"; break;
1114 *s = "DW_OP_lit5"; break;
1116 *s = "DW_OP_lit6"; break;
1118 *s = "DW_OP_lit7"; break;
1120 *s = "DW_OP_lit8"; break;
1122 *s = "DW_OP_lit9"; break;
1124 *s = "DW_OP_lit10"; break;
1126 *s = "DW_OP_lit11"; break;
1128 *s = "DW_OP_lit12"; break;
1130 *s = "DW_OP_lit13"; break;
1132 *s = "DW_OP_lit14"; break;
1134 *s = "DW_OP_lit15"; break;
1136 *s = "DW_OP_lit16"; break;
1138 *s = "DW_OP_lit17"; break;
1140 *s = "DW_OP_lit18"; break;
1142 *s = "DW_OP_lit19"; break;
1144 *s = "DW_OP_lit20"; break;
1146 *s = "DW_OP_lit21"; break;
1148 *s = "DW_OP_lit22"; break;
1150 *s = "DW_OP_lit23"; break;
1152 *s = "DW_OP_lit24"; break;
1154 *s = "DW_OP_lit25"; break;
1156 *s = "DW_OP_lit26"; break;
1158 *s = "DW_OP_lit27"; break;
1160 *s = "DW_OP_lit28"; break;
1162 *s = "DW_OP_lit29"; break;
1164 *s = "DW_OP_lit30"; break;
1166 *s = "DW_OP_lit31"; break;
1168 *s = "DW_OP_dup"; break;
1170 *s = "DW_OP_drop"; break;
1172 *s = "DW_OP_over"; break;
1174 *s = "DW_OP_swap"; break;
1176 *s = "DW_OP_rot"; break;
1178 *s = "DW_OP_xderef"; break;
1180 *s = "DW_OP_abs"; break;
1182 *s = "DW_OP_and"; break;
1184 *s = "DW_OP_div"; break;
1186 *s = "DW_OP_minus"; break;
1188 *s = "DW_OP_mod"; break;
1190 *s = "DW_OP_mul"; break;
1192 *s = "DW_OP_neg"; break;
1194 *s = "DW_OP_not"; break;
1196 *s = "DW_OP_or"; break;
1198 *s = "DW_OP_plus"; break;
1200 *s = "DW_OP_shl"; break;
1202 *s = "DW_OP_shr"; break;
1204 *s = "DW_OP_shra"; break;
1206 *s = "DW_OP_xor"; break;
1208 *s = "DW_OP_eq"; break;
1210 *s = "DW_OP_ge"; break;
1212 *s = "DW_OP_gt"; break;
1214 *s = "DW_OP_le"; break;
1216 *s = "DW_OP_lt"; break;
1218 *s = "DW_OP_ne"; break;
1220 *s = "DW_OP_nop"; break;
1222 *s = "DW_OP_const1u"; break;
1224 *s = "DW_OP_const1s"; break;
1226 *s = "DW_OP_pick"; break;
1227 case DW_OP_deref_size:
1228 *s = "DW_OP_deref_size"; break;
1229 case DW_OP_xderef_size:
1230 *s = "DW_OP_xderef_size"; break;
1232 *s = "DW_OP_const2u"; break;
1234 *s = "DW_OP_const2s"; break;
1236 *s = "DW_OP_bra"; break;
1238 *s = "DW_OP_skip"; break;
1240 *s = "DW_OP_const4u"; break;
1242 *s = "DW_OP_const4s"; break;
1244 *s = "DW_OP_const8u"; break;
1246 *s = "DW_OP_const8s"; break;
1248 *s = "DW_OP_constu"; break;
1249 case DW_OP_plus_uconst:
1250 *s = "DW_OP_plus_uconst"; break;
1252 *s = "DW_OP_regx"; break;
1254 *s = "DW_OP_piece"; break;
1256 *s = "DW_OP_consts"; break;
1258 *s = "DW_OP_breg0"; break;
1260 *s = "DW_OP_breg1"; break;
1262 *s = "DW_OP_breg2"; break;
1264 *s = "DW_OP_breg3"; break;
1266 *s = "DW_OP_breg4"; break;
1268 *s = "DW_OP_breg5"; break;
1270 *s = "DW_OP_breg6"; break;
1272 *s = "DW_OP_breg7"; break;
1274 *s = "DW_OP_breg8"; break;
1276 *s = "DW_OP_breg9"; break;
1278 *s = "DW_OP_breg10"; break;
1280 *s = "DW_OP_breg11"; break;
1282 *s = "DW_OP_breg12"; break;
1284 *s = "DW_OP_breg13"; break;
1286 *s = "DW_OP_breg14"; break;
1288 *s = "DW_OP_breg15"; break;
1290 *s = "DW_OP_breg16"; break;
1292 *s = "DW_OP_breg17"; break;
1294 *s = "DW_OP_breg18"; break;
1296 *s = "DW_OP_breg19"; break;
1298 *s = "DW_OP_breg20"; break;
1300 *s = "DW_OP_breg21"; break;
1302 *s = "DW_OP_breg22"; break;
1304 *s = "DW_OP_breg23"; break;
1306 *s = "DW_OP_breg24"; break;
1308 *s = "DW_OP_breg25"; break;
1310 *s = "DW_OP_breg26"; break;
1312 *s = "DW_OP_breg27"; break;
1314 *s = "DW_OP_breg28"; break;
1316 *s = "DW_OP_breg29"; break;
1318 *s = "DW_OP_breg30"; break;
1320 *s = "DW_OP_breg31"; break;
1322 *s = "DW_OP_fbreg"; break;
1324 *s = "DW_OP_bregx"; break;
1326 *s = "DW_OP_addr"; break;
1327 case DW_OP_push_object_address:
1328 *s = "DW_OP_push_object_address"; break;
1330 *s = "DW_OP_call2"; break;
1332 *s = "DW_OP_call4"; break;
1333 case DW_OP_call_ref:
1334 *s = "DW_OP_call_ref"; break;
1335 case DW_OP_form_tls_address:
1336 *s = "DW_OP_form_tls_address"; break;
1337 case DW_OP_call_frame_cfa:
1338 *s = "DW_OP_call_frame_cfa"; break;
1339 case DW_OP_bit_piece:
1340 *s = "DW_OP_bit_piece"; break;
1341 case DW_OP_implicit_value:
1342 *s = "DW_OP_implicit_value"; break;
1343 case DW_OP_stack_value:
1344 *s = "DW_OP_stack_value"; break;
1345 case DW_OP_implicit_pointer:
1346 *s = "DW_OP_implicit_pointer"; break;
1348 *s = "DW_OP_addrx"; break;
1350 *s = "DW_OP_constx"; break;
1351 case DW_OP_entry_value:
1352 *s = "DW_OP_entry_value"; break;
1353 case DW_OP_const_type:
1354 *s = "DW_OP_const_type"; break;
1355 case DW_OP_regval_type:
1356 *s = "DW_OP_regval_type"; break;
1357 case DW_OP_deref_type:
1358 *s = "DW_OP_deref_type"; break;
1359 case DW_OP_xderef_type:
1360 *s = "DW_OP_xderef_type"; break;
1362 *s = "DW_OP_convert"; break;
1363 case DW_OP_reinterpret:
1364 *s = "DW_OP_reinterpret"; break;
1365 case DW_OP_GNU_push_tls_address:
1366 *s = "DW_OP_GNU_push_tls_address"; break;
1367 case DW_OP_GNU_uninit:
1368 *s = "DW_OP_GNU_uninit"; break;
1369 case DW_OP_GNU_encoded_addr:
1370 *s = "DW_OP_GNU_encoded_addr"; break;
1371 case DW_OP_GNU_implicit_pointer:
1372 *s = "DW_OP_GNU_implicit_pointer"; break;
1373 case DW_OP_GNU_entry_value:
1374 *s = "DW_OP_GNU_entry_value"; break;
1375 case DW_OP_GNU_const_type:
1376 *s = "DW_OP_GNU_const_type"; break;
1377 case DW_OP_GNU_regval_type:
1378 *s = "DW_OP_GNU_regval_type"; break;
1379 case DW_OP_GNU_deref_type:
1380 *s = "DW_OP_GNU_deref_type"; break;
1381 case DW_OP_GNU_convert:
1382 *s = "DW_OP_GNU_convert"; break;
1383 case DW_OP_GNU_reinterpret:
1384 *s = "DW_OP_GNU_reinterpret"; break;
1385 case DW_OP_GNU_parameter_ref:
1386 *s = "DW_OP_GNU_parameter_ref"; break;
1387 case DW_OP_GNU_addr_index:
1388 *s = "DW_OP_GNU_addr_index"; break;
1389 case DW_OP_GNU_const_index:
1390 *s = "DW_OP_GNU_const_index"; break;
1392 return (DW_DLV_NO_ENTRY);
1399 dwarf_get_ORD_name(unsigned ord, const char **s)
1405 case DW_ORD_row_major:
1406 *s = "DW_ORD_row_major"; break;
1407 case DW_ORD_col_major:
1408 *s = "DW_ORD_col_major"; break;
1410 return (DW_DLV_NO_ENTRY);
1417 dwarf_get_TAG_name(unsigned tag, const char **s)
1423 case DW_TAG_access_declaration:
1424 *s = "DW_TAG_access_declaration"; break;
1425 case DW_TAG_array_type:
1426 *s = "DW_TAG_array_type"; break;
1427 case DW_TAG_base_type:
1428 *s = "DW_TAG_base_type"; break;
1429 case DW_TAG_catch_block:
1430 *s = "DW_TAG_catch_block"; break;
1431 case DW_TAG_class_type:
1432 *s = "DW_TAG_class_type"; break;
1433 case DW_TAG_common_block:
1434 *s = "DW_TAG_common_block"; break;
1435 case DW_TAG_common_inclusion:
1436 *s = "DW_TAG_common_inclusion"; break;
1437 case DW_TAG_compile_unit:
1438 *s = "DW_TAG_compile_unit"; break;
1439 case DW_TAG_condition:
1440 *s = "DW_TAG_condition"; break;
1441 case DW_TAG_const_type:
1442 *s = "DW_TAG_const_type"; break;
1443 case DW_TAG_constant:
1444 *s = "DW_TAG_constant"; break;
1445 case DW_TAG_dwarf_procedure:
1446 *s = "DW_TAG_dwarf_procedure"; break;
1447 case DW_TAG_entry_point:
1448 *s = "DW_TAG_entry_point"; break;
1449 case DW_TAG_enumeration_type:
1450 *s = "DW_TAG_enumeration_type"; break;
1451 case DW_TAG_enumerator:
1452 *s = "DW_TAG_enumerator"; break;
1453 case DW_TAG_formal_parameter:
1454 *s = "DW_TAG_formal_parameter"; break;
1456 *s = "DW_TAG_friend"; break;
1457 case DW_TAG_imported_declaration:
1458 *s = "DW_TAG_imported_declaration"; break;
1459 case DW_TAG_imported_module:
1460 *s = "DW_TAG_imported_module"; break;
1461 case DW_TAG_imported_unit:
1462 *s = "DW_TAG_imported_unit"; break;
1463 case DW_TAG_inheritance:
1464 *s = "DW_TAG_inheritance"; break;
1465 case DW_TAG_inlined_subroutine:
1466 *s = "DW_TAG_inlined_subroutine"; break;
1467 case DW_TAG_interface_type:
1468 *s = "DW_TAG_interface_type"; break;
1470 *s = "DW_TAG_label"; break;
1471 case DW_TAG_lexical_block:
1472 *s = "DW_TAG_lexical_block"; break;
1474 *s = "DW_TAG_member"; break;
1476 *s = "DW_TAG_module"; break;
1477 case DW_TAG_namelist:
1478 *s = "DW_TAG_namelist"; break;
1479 case DW_TAG_namelist_item:
1480 *s = "DW_TAG_namelist_item"; break;
1481 case DW_TAG_namespace:
1482 *s = "DW_TAG_namespace"; break;
1483 case DW_TAG_packed_type:
1484 *s = "DW_TAG_packed_type"; break;
1485 case DW_TAG_partial_unit:
1486 *s = "DW_TAG_partial_unit"; break;
1487 case DW_TAG_pointer_type:
1488 *s = "DW_TAG_pointer_type"; break;
1489 case DW_TAG_ptr_to_member_type:
1490 *s = "DW_TAG_ptr_to_member_type"; break;
1491 case DW_TAG_reference_type:
1492 *s = "DW_TAG_reference_type"; break;
1493 case DW_TAG_restrict_type:
1494 *s = "DW_TAG_restrict_type"; break;
1495 case DW_TAG_rvalue_reference_type:
1496 *s = "DW_TAG_rvalue_reference_type"; break;
1497 case DW_TAG_set_type:
1498 *s = "DW_TAG_set_type"; break;
1499 case DW_TAG_shared_type:
1500 *s = "DW_TAG_shared_type"; break;
1501 case DW_TAG_string_type:
1502 *s = "DW_TAG_string_type"; break;
1503 case DW_TAG_structure_type:
1504 *s = "DW_TAG_structure_type"; break;
1505 case DW_TAG_subprogram:
1506 *s = "DW_TAG_subprogram"; break;
1507 case DW_TAG_subrange_type:
1508 *s = "DW_TAG_subrange_type"; break;
1509 case DW_TAG_subroutine_type:
1510 *s = "DW_TAG_subroutine_type"; break;
1511 case DW_TAG_template_alias:
1512 *s = "DW_TAG_template_alias"; break;
1513 case DW_TAG_template_type_parameter:
1514 *s = "DW_TAG_template_type_parameter"; break;
1515 case DW_TAG_template_value_parameter:
1516 *s = "DW_TAG_template_value_parameter"; break;
1517 case DW_TAG_thrown_type:
1518 *s = "DW_TAG_thrown_type"; break;
1519 case DW_TAG_try_block:
1520 *s = "DW_TAG_try_block"; break;
1521 case DW_TAG_type_unit:
1522 *s = "DW_TAG_type_unit"; break;
1523 case DW_TAG_typedef:
1524 *s = "DW_TAG_typedef"; break;
1525 case DW_TAG_union_type:
1526 *s = "DW_TAG_union_type"; break;
1527 case DW_TAG_unspecified_parameters:
1528 *s = "DW_TAG_unspecified_parameters"; break;
1529 case DW_TAG_unspecified_type:
1530 *s = "DW_TAG_unspecified_type"; break;
1531 case DW_TAG_variable:
1532 *s = "DW_TAG_variable"; break;
1533 case DW_TAG_variant:
1534 *s = "DW_TAG_variant"; break;
1535 case DW_TAG_variant_part:
1536 *s = "DW_TAG_variant_part"; break;
1537 case DW_TAG_volatile_type:
1538 *s = "DW_TAG_volatile_type"; break;
1539 case DW_TAG_with_stmt:
1540 *s = "DW_TAG_with_stmt"; break;
1541 case DW_TAG_coarray_type:
1542 *s = "DW_TAG_coarray_type"; break;
1543 case DW_TAG_generic_subrange:
1544 *s = "DW_TAG_generic_subrange"; break;
1545 case DW_TAG_dynamic_type:
1546 *s = "DW_TAG_dynamic_type"; break;
1547 case DW_TAG_atomic_type:
1548 *s = "DW_TAG_atomic_type"; break;
1549 case DW_TAG_call_site:
1550 *s = "DW_TAG_call_site"; break;
1551 case DW_TAG_call_site_parameter:
1552 *s = "DW_TAG_call_site_parameter"; break;
1553 case DW_TAG_skeleton_unit:
1554 *s = "DW_TAG_skeleton_unit"; break;
1555 case DW_TAG_immutable_type:
1556 *s = "DW_TAG_immutable_type"; break;
1557 case DW_TAG_format_label:
1558 *s = "DW_TAG_format_label"; break;
1559 case DW_TAG_function_template:
1560 *s = "DW_TAG_function_template"; break;
1561 case DW_TAG_class_template:
1562 *s = "DW_TAG_class_template"; break;
1563 case DW_TAG_GNU_BINCL:
1564 *s = "DW_TAG_GNU_BINCL"; break;
1565 case DW_TAG_GNU_EINCL:
1566 *s = "DW_TAG_GNU_EINCL"; break;
1567 case DW_TAG_GNU_template_template_param:
1568 *s = "DW_TAG_GNU_template_template_param"; break;
1569 case DW_TAG_GNU_template_parameter_pack:
1570 *s = "DW_TAG_GNU_template_parameter_pack"; break;
1571 case DW_TAG_GNU_formal_parameter_pack:
1572 *s = "DW_TAG_GNU_formal_parameter_pack"; break;
1573 case DW_TAG_GNU_call_site:
1574 *s = "DW_TAG_GNU_call_site"; break;
1575 case DW_TAG_GNU_call_site_parameter:
1576 *s = "DW_TAG_GNU_call_site_parameter"; break;
1578 return (DW_DLV_NO_ENTRY);
1585 dwarf_get_UT_name(unsigned unit_type, const char **s)
1590 switch (unit_type) {
1592 *s = "DW_UT_compile"; break;
1594 *s = "DW_UT_type"; break;
1596 *s = "DW_UT_partial"; break;
1597 case DW_UT_skeleton:
1598 *s = "DW_UT_skeleton"; break;
1599 case DW_UT_split_compile:
1600 *s = "DW_UT_split_compile"; break;
1601 case DW_UT_split_type:
1602 *s = "DW_UT_split_type"; break;
1604 return (DW_DLV_NO_ENTRY);
1611 dwarf_get_VIRTUALITY_name(unsigned vir, const char **s)
1617 case DW_VIRTUALITY_none:
1618 *s = "DW_VIRTUALITY_none"; break;
1619 case DW_VIRTUALITY_virtual:
1620 *s = "DW_VIRTUALITY_virtual"; break;
1621 case DW_VIRTUALITY_pure_virtual:
1622 *s = "DW_VIRTUALITY_pure_virtual"; break;
1624 return (DW_DLV_NO_ENTRY);
1631 dwarf_get_VIS_name(unsigned vis, const char **s)
1638 *s = "DW_VIS_local"; break;
1639 case DW_VIS_exported:
1640 *s = "DW_VIS_exported"; break;
1641 case DW_VIS_qualified:
1642 *s = "DW_VIS_qualified"; break;
1644 return (DW_DLV_NO_ENTRY);