This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB build is broken, when HAVE_ZLIB_H is not defined.
- From: csilvers at google dot com (Craig Silverstein)
- To: maxim at tensilica dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 21 Apr 2008 14:50:56 -0700 (PDT)
- Subject: Re: GDB build is broken, when HAVE_ZLIB_H is not defined.
- References: <480D0394.8020404@hq.tensilica.com>
} 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;