diff options
author | Tom Tromey <tromey@redhat.com> | 2012-11-08 19:52:42 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-11-08 19:52:42 +0000 |
commit | ea9f10bb87523d421e6c863a7ec66dfee41692b4 (patch) | |
tree | 4ffaabac48c8d7f9209e224d1de031c7db0f3406 /gdb/xcoffread.c | |
parent | d071a26bbc15eff9beaa74baef98ffdf4ae2653d (diff) | |
download | gdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.zip gdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.tar.gz gdb-ea9f10bb87523d421e6c863a7ec66dfee41692b4.tar.bz2 |
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.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index af93a43..e4d0861 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 ())); |