2011-05-24 Tristan Gingold <gingold@adacore.com>

* symfile.h (enum dwarf2_section_enum): New type.
	(dwarf2_get_section_info): New prototype.
	* dwarf2read.c (dwarf2_get_section_info): Replace parameter
	section_name by sect.  Use a switch to select the info.
	* dwarf2-frame.c (warf2_get_section_info): Remove prototype.
	(dwarf2_build_frame_info): Adjust calls to dwarf2_get_section_info.
This commit is contained in:
Tristan Gingold
2011-05-24 12:40:17 +00:00
parent ee5683ab05
commit 3017a00367
4 changed files with 35 additions and 15 deletions

View File

@@ -2183,12 +2183,6 @@ Corrupt data in %s:%s; align 8 workaround apparently succeeded"),
return ret;
}
/* Imported from dwarf2read.c. */
extern void dwarf2_get_section_info (struct objfile *, const char *,
asection **, gdb_byte **,
bfd_size_type *);
static int
qsort_fde_cmp (const void *a, const void *b)
{
@@ -2233,7 +2227,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
unit->dbase = 0;
unit->tbase = 0;
dwarf2_get_section_info (objfile, ".eh_frame",
dwarf2_get_section_info (objfile, DWARF2_EH_FRAME,
&unit->dwarf_frame_section,
&unit->dwarf_frame_buffer,
&unit->dwarf_frame_size);
@@ -2269,7 +2263,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
}
}
dwarf2_get_section_info (objfile, ".debug_frame",
dwarf2_get_section_info (objfile, DWARF2_DEBUG_FRAME,
&unit->dwarf_frame_section,
&unit->dwarf_frame_buffer,
&unit->dwarf_frame_size);