diff options
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 ())); |