]>
Commit | Line | Data |
---|---|---|
c2a62a3d TT |
1 | /* DWARF 2 section names. |
2 | ||
213516ef | 3 | Copyright (C) 1990-2023 Free Software Foundation, Inc. |
c2a62a3d TT |
4 | |
5 | This file is part of GDB. | |
6 | ||
7 | This program is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | This program is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #ifndef GDB_DWARF2_SECT_NAMES_H | |
21 | #define GDB_DWARF2_SECT_NAMES_H | |
22 | ||
23 | /* Names for a dwarf2 debugging section. The field NORMAL is the normal | |
24 | section name (usually from the DWARF standard), while the field COMPRESSED | |
25 | is the name of compressed sections. If your object file format doesn't | |
26 | support compressed sections, the field COMPRESSED can be NULL. Likewise, | |
27 | the debugging section is not supported, the field NORMAL can be NULL too. | |
28 | It doesn't make sense to have a NULL NORMAL field but a non-NULL COMPRESSED | |
29 | field. */ | |
30 | ||
31 | struct dwarf2_section_names { | |
32 | const char *normal; | |
33 | const char *compressed; | |
fbedd546 TT |
34 | |
35 | /* Return true if NAME matches either of this section's names. */ | |
36 | bool matches (const char *name) const | |
37 | { | |
38 | return ((normal != nullptr && strcmp (name, normal) == 0) | |
39 | || (compressed != nullptr && strcmp (name, compressed) == 0)); | |
40 | } | |
c2a62a3d TT |
41 | }; |
42 | ||
43 | /* List of names for dward2 debugging sections. Also most object file formats | |
44 | use the standardized (ie ELF) names, some (eg XCOFF) have customized names | |
45 | due to restrictions. | |
46 | The table for the standard names is defined in dwarf2read.c. Please | |
47 | update all instances of dwarf2_debug_sections if you add a field to this | |
48 | structure. It is always safe to use { NULL, NULL } in this case. */ | |
49 | ||
50 | struct dwarf2_debug_sections { | |
51 | struct dwarf2_section_names info; | |
52 | struct dwarf2_section_names abbrev; | |
53 | struct dwarf2_section_names line; | |
54 | struct dwarf2_section_names loc; | |
55 | struct dwarf2_section_names loclists; | |
56 | struct dwarf2_section_names macinfo; | |
57 | struct dwarf2_section_names macro; | |
58 | struct dwarf2_section_names str; | |
59 | struct dwarf2_section_names str_offsets; | |
60 | struct dwarf2_section_names line_str; | |
61 | struct dwarf2_section_names ranges; | |
62 | struct dwarf2_section_names rnglists; | |
63 | struct dwarf2_section_names types; | |
64 | struct dwarf2_section_names addr; | |
65 | struct dwarf2_section_names frame; | |
66 | struct dwarf2_section_names eh_frame; | |
67 | struct dwarf2_section_names gdb_index; | |
68 | struct dwarf2_section_names debug_names; | |
69 | struct dwarf2_section_names debug_aranges; | |
70 | /* This field has no meaning, but exists solely to catch changes to | |
71 | this structure which are not reflected in some instance. */ | |
72 | int sentinel; | |
73 | }; | |
74 | ||
9938d15a TT |
75 | /* Section names for ELF. */ |
76 | extern const struct dwarf2_debug_sections dwarf2_elf_names; | |
77 | ||
c2a62a3d | 78 | #endif /* GDB_DWARF2_SECT_NAMES_H */ |