From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3960 invoked by alias); 21 Apr 2008 22:16:41 -0000 Received: (qmail 3951 invoked by uid 22791); 21 Apr 2008 22:16:40 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Apr 2008 22:16:23 +0000 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id m3LMFuSB028093; Mon, 21 Apr 2008 23:15:57 +0100 Received: from localhost (meta.corp.google.com [172.22.108.53]) by zps36.corp.google.com with ESMTP id m3LMFqkh029739; Mon, 21 Apr 2008 15:15:52 -0700 Received: by localhost (Postfix, from userid 500) id 4FEA33F24F4; Mon, 21 Apr 2008 14:50:56 -0700 (PDT) To: maxim@tensilica.com CC: gdb-patches@sourceware.org In-reply-to: <480D0394.8020404@hq.tensilica.com> (message from Maxim Grigoriev on Mon, 21 Apr 2008 14:13:56 -0700) Subject: Re: GDB build is broken, when HAVE_ZLIB_H is not defined. References: <480D0394.8020404@hq.tensilica.com> Message-Id: <20080421215056.4FEA33F24F4@localhost> Date: Tue, 22 Apr 2008 01:35:00 -0000 From: csilvers@google.com (Craig Silverstein) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00457.txt.bz2 } 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;