summaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-11-08 19:52:40 +0000
committerTom Tromey <tromey@redhat.com>2012-11-08 19:52:40 +0000
commitb9aac110504cd50dbf2fc2c99dff503a1fed64c2 (patch)
treee5fec7d23e1d8d37f0e27a049b0709ae1a237c02 /gdb/xcoffread.c
parentc80bc9d5a45ce1fdf7a7785bf22f0bcf28189c30 (diff)
downloadgdb-b9aac110504cd50dbf2fc2c99dff503a1fed64c2.tar.gz
PR gdb/14704:
* gdb_bfd.c (gdb_bfd_ref): Set BFD_DECOMPRESS. (zlib_decompress_section): Remove. (gdb_bfd_map_section): Only check for compressed section in mmap case. Use bfd_get_full_section_contents. * osabi.c (check_note): Add 'sectsize' argument. Read section data. (generic_elf_osabi_sniff_abi_tag_sections): Don't read section data. Update for check_note change. * xcoffread.c (xcoff_initial_scan): Use bfd_get_full_section_contents. * py-auto-load.c (auto_load_section_scripts): Use bfd_get_full_section_contents. * contrib/cc-with-tweaks.sh: Add -Z option. testsuite * gdb.base/comprdebug.exp: New file.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index af93a4345b6..e4d08615caf 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2989,7 +2989,7 @@ xcoff_initial_scan (struct objfile *objfile, int symfile_flags)
{
struct bfd_section *secp;
bfd_size_type length;
- char *debugsec = NULL;
+ bfd_byte *debugsec = NULL;
secp = bfd_get_section_by_name (abfd, ".debug");
if (secp)
@@ -2997,11 +2997,9 @@ xcoff_initial_scan (struct objfile *objfile, int symfile_flags)
length = bfd_section_size (abfd, secp);
if (length)
{
- debugsec =
- (char *) obstack_alloc (&objfile->objfile_obstack, length);
+ debugsec = obstack_alloc (&objfile->objfile_obstack, length);
- if (!bfd_get_section_contents (abfd, secp, debugsec,
- (file_ptr) 0, length))
+ if (!bfd_get_full_section_contents (abfd, secp, &debugsec))
{
error (_("Error reading .debug section of `%s': %s"),
name, bfd_errmsg (bfd_get_error ()));