1 |
/* Declarations and definitions of codes relating to the DWARF2 symbolic |
/* Declarations and definitions of codes relating to the DWARF2 symbolic |
2 |
debugging information format. |
debugging information format. |
3 |
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002 |
Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002, |
4 |
Free Software Foundation, Inc. |
2003 Free Software Foundation, Inc. |
5 |
|
|
6 |
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program |
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program |
7 |
Office (AJPO), Florida State Unviversity and Silicon Graphics Inc. |
Office (AJPO), Florida State University and Silicon Graphics Inc. |
8 |
provided support for this effort -- June 21, 1995. |
provided support for this effort -- June 21, 1995. |
9 |
|
|
10 |
Derived from the DWARF 1 implementation written by Ron Guilmette |
Derived from the DWARF 1 implementation written by Ron Guilmette |
11 |
(rfg@netcom.com), November 1990. |
(rfg@netcom.com), November 1990. |
12 |
|
|
13 |
This file is part of GCC. |
This file is part of GCC. |
14 |
|
|
15 |
GCC is free software; you can redistribute it and/or modify it under |
GCC is free software; you can redistribute it and/or modify it under |
16 |
the terms of the GNU General Public License as published by the Free |
the terms of the GNU General Public License as published by the Free |
17 |
Software Foundation; either version 2, or (at your option) any later |
Software Foundation; either version 2, or (at your option) any later |
18 |
version. |
version. |
19 |
|
|
20 |
GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
GCC is distributed in the hope that it will be useful, but WITHOUT |
21 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
22 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
23 |
for more details. |
License for more details. |
24 |
|
|
25 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
26 |
along with GCC; see the file COPYING. If not, write to the Free |
along with GCC; see the file COPYING. If not, write to the Free |
27 |
Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
28 |
02111-1307, USA. */ |
02111-1307, USA. */ |
29 |
|
|
30 |
/* This file is derived from the DWARF specification (a public document) |
/* This file is derived from the DWARF specification (a public document) |
31 |
Revision 2.0.0 (July 27, 1993) developed by the UNIX International |
Revision 2.0.0 (July 27, 1993) developed by the UNIX International |
87 |
} |
} |
88 |
DWARF2_Internal_PubNames; |
DWARF2_Internal_PubNames; |
89 |
|
|
90 |
/* Strcuture found in .debug_info section. */ |
/* Structure found in .debug_info section. */ |
91 |
typedef struct |
typedef struct |
92 |
{ |
{ |
93 |
unsigned char cu_length [4]; |
unsigned char cu_length [4]; |
189 |
DW_TAG_imported_unit = 0x3d, |
DW_TAG_imported_unit = 0x3d, |
190 |
/* SGI/MIPS Extensions. */ |
/* SGI/MIPS Extensions. */ |
191 |
DW_TAG_MIPS_loop = 0x4081, |
DW_TAG_MIPS_loop = 0x4081, |
192 |
|
/* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */ |
193 |
|
DW_TAG_HP_array_descriptor = 0x4090, |
194 |
/* GNU extensions. */ |
/* GNU extensions. */ |
195 |
DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */ |
DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */ |
196 |
DW_TAG_function_template = 0x4102, /* For C++. */ |
DW_TAG_function_template = 0x4102, /* For C++. */ |
197 |
DW_TAG_class_template = 0x4103, /* For C++. */ |
DW_TAG_class_template = 0x4103, /* For C++. */ |
198 |
DW_TAG_GNU_BINCL = 0x4104, |
DW_TAG_GNU_BINCL = 0x4104, |
199 |
DW_TAG_GNU_EINCL = 0x4105 |
DW_TAG_GNU_EINCL = 0x4105, |
200 |
|
/* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ |
201 |
|
DW_TAG_upc_shared_type = 0x8765, |
202 |
|
DW_TAG_upc_strict_type = 0x8766, |
203 |
|
DW_TAG_upc_relaxed_type = 0x8767, |
204 |
|
/* PGI (STMicroelectronics) extensions. No documentation available. */ |
205 |
|
DW_TAG_PGI_kanji_type = 0xA000, |
206 |
|
DW_TAG_PGI_interface_block = 0xA020 |
207 |
}; |
}; |
208 |
|
|
209 |
#define DW_TAG_lo_user 0x4080 |
#define DW_TAG_lo_user 0x4080 |
240 |
}; |
}; |
241 |
|
|
242 |
/* Attribute names and codes. */ |
/* Attribute names and codes. */ |
|
|
|
243 |
enum dwarf_attribute |
enum dwarf_attribute |
244 |
{ |
{ |
245 |
DW_AT_sibling = 0x01, |
DW_AT_sibling = 0x01, |
317 |
DW_AT_call_column = 0x57, |
DW_AT_call_column = 0x57, |
318 |
DW_AT_call_file = 0x58, |
DW_AT_call_file = 0x58, |
319 |
DW_AT_call_line = 0x59, |
DW_AT_call_line = 0x59, |
320 |
/* SGI/MIPS Extensions. */ |
/* SGI/MIPS extensions. */ |
321 |
DW_AT_MIPS_fde = 0x2001, |
DW_AT_MIPS_fde = 0x2001, |
322 |
DW_AT_MIPS_loop_begin = 0x2002, |
DW_AT_MIPS_loop_begin = 0x2002, |
323 |
DW_AT_MIPS_tail_loop_begin = 0x2003, |
DW_AT_MIPS_tail_loop_begin = 0x2003, |
329 |
DW_AT_MIPS_abstract_name = 0x2009, |
DW_AT_MIPS_abstract_name = 0x2009, |
330 |
DW_AT_MIPS_clone_origin = 0x200a, |
DW_AT_MIPS_clone_origin = 0x200a, |
331 |
DW_AT_MIPS_has_inlines = 0x200b, |
DW_AT_MIPS_has_inlines = 0x200b, |
332 |
|
/* HP extensions. */ |
333 |
|
DW_AT_HP_block_index = 0x2000, |
334 |
|
DW_AT_HP_unmodifiable = 0x2001, /* Same as DW_AT_MIPS_fde. */ |
335 |
|
DW_AT_HP_actuals_stmt_list = 0x2010, |
336 |
|
DW_AT_HP_proc_per_section = 0x2011, |
337 |
|
DW_AT_HP_raw_data_ptr = 0x2012, |
338 |
|
DW_AT_HP_pass_by_reference = 0x2013, |
339 |
|
DW_AT_HP_opt_level = 0x2014, |
340 |
|
DW_AT_HP_prof_version_id = 0x2015, |
341 |
|
DW_AT_HP_opt_flags = 0x2016, |
342 |
|
DW_AT_HP_cold_region_low_pc = 0x2017, |
343 |
|
DW_AT_HP_cold_region_high_pc = 0x2018, |
344 |
|
DW_AT_HP_all_variables_modifiable = 0x2019, |
345 |
|
DW_AT_HP_linkage_name = 0x201a, |
346 |
|
DW_AT_HP_prof_flags = 0x201b, /* In comp unit of procs_info for -g. */ |
347 |
/* GNU extensions. */ |
/* GNU extensions. */ |
348 |
DW_AT_sf_names = 0x2101, |
DW_AT_sf_names = 0x2101, |
349 |
DW_AT_src_info = 0x2102, |
DW_AT_src_info = 0x2102, |
352 |
DW_AT_body_begin = 0x2105, |
DW_AT_body_begin = 0x2105, |
353 |
DW_AT_body_end = 0x2106, |
DW_AT_body_end = 0x2106, |
354 |
DW_AT_GNU_vector = 0x2107, |
DW_AT_GNU_vector = 0x2107, |
355 |
/* VMS Extensions. */ |
/* VMS extensions. */ |
356 |
DW_AT_VMS_rtnbeg_pd_address = 0x2201 |
DW_AT_VMS_rtnbeg_pd_address = 0x2201, |
357 |
|
/* UPC extension. */ |
358 |
|
DW_AT_upc_threads_scaled = 0x3210, |
359 |
|
/* PGI (STMicroelectronics) extensions. */ |
360 |
|
DW_AT_PGI_lbase = 0x3a00, |
361 |
|
DW_AT_PGI_soffset = 0x3a01, |
362 |
|
DW_AT_PGI_lstride = 0x3a02 |
363 |
}; |
}; |
364 |
|
|
365 |
#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ |
#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ |
517 |
DW_OP_push_object_address = 0x97, |
DW_OP_push_object_address = 0x97, |
518 |
DW_OP_call2 = 0x98, |
DW_OP_call2 = 0x98, |
519 |
DW_OP_call4 = 0x99, |
DW_OP_call4 = 0x99, |
520 |
DW_OP_calli = 0x9a |
DW_OP_call_ref = 0x9a, |
521 |
|
/* GNU extensions. */ |
522 |
|
DW_OP_GNU_push_tls_address = 0xe0, |
523 |
|
/* HP extensions. */ |
524 |
|
DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */ |
525 |
|
DW_OP_HP_is_value = 0xe1, |
526 |
|
DW_OP_HP_fltconst4 = 0xe2, |
527 |
|
DW_OP_HP_fltconst8 = 0xe3, |
528 |
|
DW_OP_HP_mod_range = 0xe4, |
529 |
|
DW_OP_HP_unmod_range = 0xe5, |
530 |
|
DW_OP_HP_tls = 0xe6 |
531 |
}; |
}; |
532 |
|
|
533 |
#define DW_OP_lo_user 0x80 /* Implementation-defined range start. */ |
#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */ |
534 |
#define DW_OP_hi_user 0xff /* Implementation-defined range end. */ |
#define DW_OP_hi_user 0xff /* Implementation-defined range end. */ |
535 |
|
|
536 |
/* Type encodings. */ |
/* Type encodings. */ |
546 |
DW_ATE_unsigned = 0x7, |
DW_ATE_unsigned = 0x7, |
547 |
DW_ATE_unsigned_char = 0x8, |
DW_ATE_unsigned_char = 0x8, |
548 |
/* DWARF 3. */ |
/* DWARF 3. */ |
549 |
DW_ATE_imaginary_float = 0x9 |
DW_ATE_imaginary_float = 0x9, |
550 |
|
/* HP extensions. */ |
551 |
|
DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */ |
552 |
|
DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */ |
553 |
|
DW_ATE_HP_float128 = 0x82, /* Floating-point (128 bit). */ |
554 |
|
DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */ |
555 |
|
DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */ |
556 |
|
DW_ATE_HP_imaginary_float80 = 0x85, |
557 |
|
DW_ATE_HP_imaginary_float128 = 0x86 |
558 |
}; |
}; |
559 |
|
|
560 |
#define DW_ATE_lo_user 0x80 |
#define DW_ATE_lo_user 0x80 |
605 |
{ |
{ |
606 |
DW_CC_normal = 0x1, |
DW_CC_normal = 0x1, |
607 |
DW_CC_program = 0x2, |
DW_CC_program = 0x2, |
608 |
DW_CC_nocall = 0x3 |
DW_CC_nocall = 0x3, |
609 |
|
DW_CC_GNU_renesas_sh = 0x40 |
610 |
}; |
}; |
611 |
|
|
612 |
#define DW_CC_lo_user 0x40 |
#define DW_CC_lo_user 0x40 |
652 |
{ |
{ |
653 |
DW_LNE_end_sequence = 1, |
DW_LNE_end_sequence = 1, |
654 |
DW_LNE_set_address = 2, |
DW_LNE_set_address = 2, |
655 |
DW_LNE_define_file = 3 |
DW_LNE_define_file = 3, |
656 |
|
/* HP extensions. */ |
657 |
|
DW_LNE_HP_negate_is_UV_update = 0x11, |
658 |
|
DW_LNE_HP_push_context = 0x12, |
659 |
|
DW_LNE_HP_pop_context = 0x13, |
660 |
|
DW_LNE_HP_set_file_line_column = 0x14, |
661 |
|
DW_LNE_HP_set_routine_name = 0x15, |
662 |
|
DW_LNE_HP_set_sequence = 0x16, |
663 |
|
DW_LNE_HP_negate_post_semantics = 0x17, |
664 |
|
DW_LNE_HP_negate_function_exit = 0x18, |
665 |
|
DW_LNE_HP_negate_front_end_logical = 0x19, |
666 |
|
DW_LNE_HP_define_proc = 0x20 |
667 |
}; |
}; |
668 |
|
|
669 |
/* Call frame information. */ |
/* Call frame information. */ |
687 |
DW_CFA_def_cfa = 0x0c, |
DW_CFA_def_cfa = 0x0c, |
688 |
DW_CFA_def_cfa_register = 0x0d, |
DW_CFA_def_cfa_register = 0x0d, |
689 |
DW_CFA_def_cfa_offset = 0x0e, |
DW_CFA_def_cfa_offset = 0x0e, |
|
|
|
690 |
/* DWARF 3. */ |
/* DWARF 3. */ |
691 |
DW_CFA_def_cfa_expression = 0x0f, |
DW_CFA_def_cfa_expression = 0x0f, |
692 |
DW_CFA_expression = 0x10, |
DW_CFA_expression = 0x10, |
693 |
DW_CFA_offset_extended_sf = 0x11, |
DW_CFA_offset_extended_sf = 0x11, |
694 |
DW_CFA_def_cfa_sf = 0x12, |
DW_CFA_def_cfa_sf = 0x12, |
695 |
DW_CFA_def_cfa_offset_sf = 0x13, |
DW_CFA_def_cfa_offset_sf = 0x13, |
|
|
|
696 |
/* SGI/MIPS specific. */ |
/* SGI/MIPS specific. */ |
697 |
DW_CFA_MIPS_advance_loc8 = 0x1d, |
DW_CFA_MIPS_advance_loc8 = 0x1d, |
|
|
|
698 |
/* GNU extensions. */ |
/* GNU extensions. */ |
699 |
DW_CFA_GNU_window_save = 0x2d, |
DW_CFA_GNU_window_save = 0x2d, |
700 |
DW_CFA_GNU_args_size = 0x2e, |
DW_CFA_GNU_args_size = 0x2e, |
732 |
DW_LANG_Ada95 = 0x000d, |
DW_LANG_Ada95 = 0x000d, |
733 |
DW_LANG_Fortran95 = 0x000e, |
DW_LANG_Fortran95 = 0x000e, |
734 |
/* MIPS. */ |
/* MIPS. */ |
735 |
DW_LANG_Mips_Assembler = 0x8001 |
DW_LANG_Mips_Assembler = 0x8001, |
736 |
|
/* UPC. */ |
737 |
|
DW_LANG_Upc = 0x8765 |
738 |
}; |
}; |
739 |
|
|
|
|
|
740 |
#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ |
#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ |
741 |
#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */ |
#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */ |
742 |
|
|