GDB (xrefs)
Loading...
Searching...
No Matches
sect-names.h
Go to the documentation of this file.
1/* DWARF 2 section names.
2
3 Copyright (C) 1990-2023 Free Software Foundation, Inc.
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
32 const char *normal;
33 const char *compressed;
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 }
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
74
75/* Section names for ELF. */
76extern const struct dwarf2_debug_sections dwarf2_elf_names;
77
78#endif /* GDB_DWARF2_SECT_NAMES_H */
const char *const name
const struct dwarf2_debug_sections dwarf2_elf_names
Definition read.c:175
struct dwarf2_section_names line_str
Definition sect-names.h:60
struct dwarf2_section_names ranges
Definition sect-names.h:61
struct dwarf2_section_names rnglists
Definition sect-names.h:62
struct dwarf2_section_names frame
Definition sect-names.h:65
struct dwarf2_section_names loc
Definition sect-names.h:54
struct dwarf2_section_names eh_frame
Definition sect-names.h:66
struct dwarf2_section_names str_offsets
Definition sect-names.h:59
struct dwarf2_section_names debug_aranges
Definition sect-names.h:69
struct dwarf2_section_names loclists
Definition sect-names.h:55
struct dwarf2_section_names gdb_index
Definition sect-names.h:67
struct dwarf2_section_names addr
Definition sect-names.h:64
struct dwarf2_section_names macro
Definition sect-names.h:57
struct dwarf2_section_names info
Definition sect-names.h:51
struct dwarf2_section_names str
Definition sect-names.h:58
struct dwarf2_section_names macinfo
Definition sect-names.h:56
struct dwarf2_section_names abbrev
Definition sect-names.h:52
struct dwarf2_section_names line
Definition sect-names.h:53
bool matches(const char *name) const
Definition sect-names.h:36
const char * normal
Definition sect-names.h:32
const char * compressed
Definition sect-names.h:33