Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: csilvers@google.com (Craig Silverstein)
To: maxim@tensilica.com
Cc: gdb-patches@sourceware.org
Subject: Re: GDB build is broken, when HAVE_ZLIB_H is not defined.
Date: Tue, 22 Apr 2008 01:35:00 -0000	[thread overview]
Message-ID: <20080421215056.4FEA33F24F4@localhost> (raw)
In-Reply-To: <480D0394.8020404@hq.tensilica.com> (message from Maxim Grigoriev 	on Mon, 21 Apr 2008 14:13:56 -0700)

} Am I missing something here ?

No, you're absolutely right.  I tested the no-zlib case, but then
refactored the code after that, and must have neglected to test the
no-zlib case again.  I'm sorry for the trouble. :-(  I've attached the
suggested patch to fix it, below.  gdb-patches folks, look ok?

craig

--cut here--

	* dwarf2read.c (zlib_decompress_section): Define abfd in the
	!HAVE_ZLIB_H case.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.255
diff -u -r1.255 dwarf2read.c
--- dwarf2read.c	19 Apr 2008 05:06:54 -0000	1.255
+++ dwarf2read.c	21 Apr 2008 21:49:53 -0000
@@ -5295,12 +5295,12 @@
 zlib_decompress_section (struct objfile *objfile, asection *sectp,
                          gdb_byte **outbuf, bfd_size_type *outsize)
 {
+  bfd *abfd = objfile->obfd;
 #ifndef HAVE_ZLIB_H
   error (_("Support for zlib-compressed DWARF data (from '%s') "
            "is disabled in this copy of GDB"),
          bfd_get_filename (abfd));
 #else
-  bfd *abfd = objfile->obfd;
   bfd_size_type compressed_size = bfd_get_section_size (sectp);
   gdb_byte *compressed_buffer = xmalloc (compressed_size);
   bfd_size_type uncompressed_size;


      parent reply	other threads:[~2008-04-21 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 22:16 Maxim Grigoriev
2008-04-21 22:38 ` Craig Silverstein
2008-04-22  3:24   ` Daniel Jacobowitz
2008-04-22  1:35 ` Craig Silverstein [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080421215056.4FEA33F24F4@localhost \
    --to=csilvers@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=maxim@tensilica.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox