1 /* Copyright (C) 2021-2024 Free Software Foundation, Inc. 2 Contributed by Oracle. 3 4 This file is part of GNU Binutils. 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3, or (at your option) 9 any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, 51 Franklin Street - Fifth Floor, Boston, 19 MA 02110-1301, USA. */ 20 21 #ifndef _Dwarf_h_ 22 #define _Dwarf_h_ 1 23 24 #include "dwarf2.h" 25 26 #include "Stabs.h" 27 #include "dbe_structs.h" 28 #include "DwarfLib.h" 29 30 enum 31 { 32 /* ICC extensions */ 33 DW_AT_icc_flags = 0x3b01, 34 DW_TAG_icc_compile_unit = 0x7000, 35 36 /* Sun extensions */ 37 DW_ATCF_SUN_branch_target = 0x46, 38 DW_AT_SUN_command_line = 0x2205, 39 DW_AT_SUN_func_offsets = 0x2211, 40 DW_AT_SUN_cf_kind = 0x2212, 41 DW_AT_SUN_func_offset = 0x2216, 42 DW_AT_SUN_memop_type_ref = 0x2217, 43 DW_AT_SUN_profile_id = 0x2218, 44 DW_AT_SUN_memop_signature = 0x2219, 45 DW_AT_SUN_obj_dir = 0x2220, 46 DW_AT_SUN_obj_file = 0x2221, 47 DW_AT_SUN_original_name = 0x2222, 48 DW_AT_SUN_link_name = 0x2226, 49 50 DW_TAG_SUN_codeflags = 0x4206, 51 DW_TAG_SUN_memop_info = 0x4207, 52 DW_TAG_SUN_dtor_info = 0x420a, 53 DW_TAG_SUN_dtor = 0x420b, 54 55 DW_LANG_SUN_Assembler = 0x9001 56 }; 57 58 59 class LoadObject; 60 class Module; 61 class DwrCU; 62 class DwrSec; 63 64 class Dwarf 65 { 66 public: 67 Dwarf (Stabs *_stabs); 68 ~Dwarf (); 69 bool archive_Dwarf (LoadObject *lo); 70 void srcline_Dwarf (Module *module); 71 void read_hwcprof_info (Module *module); 72 73 Stabs::Stab_status status; 74 Vector<DwrCU *> *dwrCUs; 75 DwrSec *debug_infoSec; 76 DwrSec *debug_abbrevSec; 77 DwrSec *debug_strSec; 78 DwrSec *debug_lineSec; 79 DwrSec *debug_line_strSec; 80 DwrSec *debug_rangesSec; 81 Elf *elf; 82 Stabs *stabs; 83 84 private: 85 DwrSec *dwrGetSec (const char *sec_name); 86 }; 87 88 #endif /* _Dwarf_h_ */ 89