aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.h
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-05-26 07:47:10 +0000
committerTristan Gingold <gingold@adacore.com>2011-05-26 07:47:10 +0000
commit251d32d96eb30422d48d270a0d55a02c0203f4c9 (patch)
tree51b6ed91fe0912a4fbcd7a95cffaafec2f69c954 /gdb/symfile.h
parent2676a7d99177c857a9cf46543f961816e2650365 (diff)
downloadgdb-251d32d96eb30422d48d270a0d55a02c0203f4c9.zip
gdb-251d32d96eb30422d48d270a0d55a02c0203f4c9.tar.gz
gdb-251d32d96eb30422d48d270a0d55a02c0203f4c9.tar.bz2
2011-05-26 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct dwarf2_section_names): New type. (struct dwarf2_debug_sections): New type. (dwarf2_has_info): Add parameter. * dwarf2read.c (dwarf2_elf_names): New variable. (INFO_SECTION, ABBREV_SECTION, LINE_SECTION, LOC_SECTION) (MACINFO_SECTION, STR_SECTION, RANGES_SECTION, TYPES_SECTION) (FRAME_SECTION, EH_FRAME_SECTION, GDB_INDEX_SECTION): Remove. (dwarf2_has_info): Add names parameter. Pass names to dwarf2_locate_sections. (section_is_p): Rewrite using the names parameter. (dwarf2_locate_sections): Use section names from the names parameter. * coffread.c (coff_symfile_read): Adjust call to dwarf2_has_info. * elfread.c (read_psyms): Ditto. * machoread.c (macho_symfile_read): Ditto.
Diffstat (limited to 'gdb/symfile.h')
-rw-r--r--gdb/symfile.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/gdb/symfile.h b/gdb/symfile.h
index 2b80ffd..9c0bb75 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -553,7 +553,42 @@ extern struct cleanup *increment_reading_symtab (void);
/* From dwarf2read.c */
-extern int dwarf2_has_info (struct objfile *);
+/* Names for a dwarf2 debugging section. The field NORMAL is the normal
+ section name (usually from the DWARF standard), while the field COMPRESSED
+ is the name of compressed sections. If your object file format doesn't
+ support compressed sections, the field COMPRESSED can be NULL. Likewise,
+ the debugging section is not supported, the field NORMAL can be NULL too.
+ It doesn't make sense to have a NULL NORMAL field but a non-NULL COMPRESSED
+ field. */
+
+struct dwarf2_section_names {
+ const char *normal;
+ const char *compressed;
+};
+
+/* List of names for dward2 debugging sections. Also most object file formats
+ use the standardized (ie ELF) names, some (eg XCOFF) have customized names
+ due to restrictions.
+ The table for the standard names is defined in dwarf2read.c. Please
+ update all instances of dwarf2_debug_sections if you add a field to this
+ structure. It is always safe to use { NULL, NULL } in this case. */
+
+struct dwarf2_debug_sections {
+ struct dwarf2_section_names info;
+ struct dwarf2_section_names abbrev;
+ struct dwarf2_section_names line;
+ struct dwarf2_section_names loc;
+ struct dwarf2_section_names macinfo;
+ struct dwarf2_section_names str;
+ struct dwarf2_section_names ranges;
+ struct dwarf2_section_names types;
+ struct dwarf2_section_names frame;
+ struct dwarf2_section_names eh_frame;
+ struct dwarf2_section_names gdb_index;
+};
+
+extern int dwarf2_has_info (struct objfile *,
+ const struct dwarf2_debug_sections *);
/* Dwarf2 sections that can be accessed by dwarf2_get_section_info. */
enum dwarf2_section_enum {