| 1 |
/* |
| 2 |
Copyright (C) 2018 David Anderson All Rights Reserved. |
| 3 |
|
| 4 |
This program is free software; you can redistribute it |
| 5 |
and/or modify it under the terms of version 2.1 of the |
| 6 |
GNU Lesser General Public License as published by the Free |
| 7 |
Software Foundation. |
| 8 |
|
| 9 |
This program is distributed in the hope that it would be |
| 10 |
useful, but WITHOUT ANY WARRANTY; without even the implied |
| 11 |
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 12 |
PURPOSE. |
| 13 |
|
| 14 |
Further, this software is distributed without any warranty |
| 15 |
that it is free of the rightful claim of any third person |
| 16 |
regarding infringement or the like. Any license provided |
| 17 |
herein, whether implied or otherwise, applies only to this |
| 18 |
software file. Patent licenses, if any, provided herein |
| 19 |
do not apply to combinations of this program with other |
| 20 |
software, or any other product whatsoever. |
| 21 |
|
| 22 |
You should have received a copy of the GNU Lesser General |
| 23 |
Public License along with this program; if not, write the |
| 24 |
Free Software Foundation, Inc., 51 Franklin Street - Fifth |
| 25 |
Floor, Boston MA 02110-1301, USA. |
| 26 |
*/ |
| 27 |
|
| 28 |
/* The numbers here are almost all 32 bits. |
| 29 |
Not long long ever. |
| 30 |
In the public function interfaces we'll use Dwarf_Unsigned though, |
| 31 |
for call consistency with everything else. |
| 32 |
Here we use Dwarf_Unsigned to avoid having to |
| 33 |
even know what is or is not 32 bits. */ |
| 34 |
|
| 35 |
typedef Dwarf_Unsigned dn_type; |
| 36 |
|
| 37 |
struct Dwarf_P_Dnames_Head_s { |
| 38 |
dn_type dh_unit_length; |
| 39 |
unsigned dh_version; |
| 40 |
unsigned dh_offset_size; |
| 41 |
dn_type dh_offset; |
| 42 |
dn_type dh_comp_unit_count; |
| 43 |
dn_type dh_local_type_unit_count; |
| 44 |
dn_type dh_foreign_type_unit_count; |
| 45 |
dn_type dh_bucket_count; |
| 46 |
dn_type dh_name_count; |
| 47 |
dn_type dh_abbrev_table_size; |
| 48 |
dn_type dh_augmentation_string_size; |
| 49 |
const char *dh_augmentation_string; |
| 50 |
}; |
| 51 |
|
| 52 |
struct Dwarf_P_Dnames_uarray_s { |
| 53 |
dn_type dne_allocated; |
| 54 |
dn_type dne_used; |
| 55 |
dn_type *dne_values; |
| 56 |
}; |
| 57 |
struct Dwarf_P_Dnames_sarray_s { |
| 58 |
dn_type dne_allocated; |
| 59 |
dn_type dne_used; |
| 60 |
Dwarf_Sig8 *dne_values; |
| 61 |
}; |
| 62 |
|
| 63 |
struct Dwarf_P_Dnames_s { |
| 64 |
Dwarf_Small dn_create_section; |
| 65 |
struct Dwarf_P_Dnames_Head_s dn_header; |
| 66 |
#if 0 |
| 67 |
struct Dwarf_P_Dnames_uarray_s dn_cunit_offset; |
| 68 |
struct Dwarf_P_Dnames_uarray_s dn_tunit_offset; |
| 69 |
struct Dwarf_P_Dnames_sarray_s dn_sunit_sigs; |
| 70 |
struct Dwarf_P_Dnames_uarray_s dn_buckets; |
| 71 |
#endif |
| 72 |
Dwarf_P_Debug dn_dbg; |
| 73 |
|
| 74 |
/* Hashes count applies to string offsets |
| 75 |
and entry offsets arrays too. */ |
| 76 |
struct Dwarf_P_Dnames_uarray_s dn_hashes; |
| 77 |
struct Dwarf_P_Dnames_uarray_s dn_string_offsets; |
| 78 |
struct Dwarf_P_Dnames_uarray_s dn_entry_pool; |
| 79 |
|
| 80 |
Dwarf_Small *dn_index_entry_pool; |
| 81 |
Dwarf_Small dn_index_entry_pool_size; |
| 82 |
Dwarf_Small dn_index_entry_pool_used; |
| 83 |
}; |