« Return to Thread: [RFA Fission supplement #2] Handle compressed sections in DWO files

[RFA Fission supplement #2] Handle compressed sections in DWO files

by Doug Evans-3 :: Rate this Message:

| View in Thread

Hi.

This is a trivial change.  Debug info may come from a separate DWO file,
not the objfile, so use sectp->owner instead of objfile->obfd.

Ok to commit? [with the rest of the Fission patch set of course]

2012-04-25  Doug Evans  <dje@...>

        * dwarf2read.c (zlib_decompress_section): Use sectp->owner instead of
        objfile->obfd.

--- dwarf2read.c.with-supplement1 2012-04-25 17:01:02.000000000 -0700
+++ dwarf2read.c 2012-04-25 17:05:29.000000000 -0700
@@ -1614,7 +1614,7 @@ static void
 zlib_decompress_section (struct objfile *objfile, asection *sectp,
                          gdb_byte **outbuf, bfd_size_type *outsize)
 {
-  bfd *abfd = objfile->obfd;
+  bfd *abfd = sectp->owner;
 #ifndef HAVE_ZLIB_H
   error (_("Support for zlib-compressed DWARF data (from '%s') "
            "is disabled in this copy of GDB"),

 « Return to Thread: [RFA Fission supplement #2] Handle compressed sections in DWO files