From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21267 invoked by alias); 20 Jun 2002 18:39:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21257 invoked from network); 20 Jun 2002 18:39:38 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 20 Jun 2002 18:39:38 -0000 Received: from 01-047.118.popsite.net ([66.19.120.47] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17L6qF-0007zW-00 for ; Thu, 20 Jun 2002 13:39:35 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17L6qI-0005pD-00 for ; Thu, 20 Jun 2002 14:39:38 -0400 Date: Thu, 20 Jun 2002 11:39:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: RFA: don't read coff line number unless we have symbols too Message-ID: <20020620183938.GA22233@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20020306235855.56ECE5E9DE@zwingli.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2002-06/txt/msg00403.txt.bz2 You may want to contact him (MAINTAINERS says Philippe De Muyter, phdm@macqel.be) directly. I've never once seen him on this list. On Thu, Jun 20, 2002 at 01:26:48PM -0500, Jim Blandy wrote: > > Ping to the COFF maintainer: this patch needs review. > > Jim Blandy writes: > > > 2002-03-06 Jim Blandy > > > > * coffread.c (coff_symfile_read): Don't try to read the line > > number table from disk if the image file doesn't have a symbol > > table; we'll never actually look at the info anyway, and Windows > > ships DLL's with bogus file offsets for the line number data. > > > > Index: gdb/coffread.c > > =================================================================== > > RCS file: /cvs/cvsfiles/devo/gdb/coffread.c,v > > retrieving revision 1.182 > > diff -c -r1.182 coffread.c > > *** gdb/coffread.c 2001/09/25 02:35:52 1.182 > > --- gdb/coffread.c 2002/03/06 23:12:00 > > *************** > > *** 622,637 **** > > > > /* End of warning */ > > > > ! /* Read the line number table, all at once. */ > > ! info->min_lineno_offset = 0; > > ! info->max_lineno_offset = 0; > > ! bfd_map_over_sections (abfd, find_linenos, (PTR) info); > > > > ! make_cleanup (free_linetab_cleanup, 0 /*ignore*/); > > ! val = init_lineno (abfd, info->min_lineno_offset, > > ! info->max_lineno_offset - info->min_lineno_offset); > > ! if (val < 0) > > ! error ("\"%s\": error reading line numbers\n", name); > > > > /* Now read the string table, all at once. */ > > > > --- 622,654 ---- > > > > /* End of warning */ > > > > ! /* Only read line number information if we have symbols. > > > > ! On Windows NT, some of the system's DLL's have sections with > > ! PointerToLinenumbers fields that are non-zero, but point at > > ! random places within the image file. (In the case I found, > > ! KERNEL32.DLL's .text section has a line number info pointer that > > ! points into the middle of the string `lib\\i386\kernel32.dll'.) > > ! > > ! However, these DLL's also have no symbols. The line number > > ! tables are meaningless without symbols. And in fact, GDB never > > ! uses the line number information unless there are symbols. So we > > ! can avoid spurious error messages (and maybe run a little > > ! faster!) by not even reading the line number table unless we have > > ! symbols. */ > > ! if (num_symbols > 0) > > ! { > > ! /* Read the line number table, all at once. */ > > ! info->min_lineno_offset = 0; > > ! info->max_lineno_offset = 0; > > ! bfd_map_over_sections (abfd, find_linenos, (PTR) info); > > ! > > ! make_cleanup (free_linetab_cleanup, 0 /*ignore*/); > > ! val = init_lineno (abfd, info->min_lineno_offset, > > ! info->max_lineno_offset - info->min_lineno_offset); > > ! if (val < 0) > > ! error ("\"%s\": error reading line numbers\n", name); > > ! } > > > > /* Now read the string table, all at once. */ > > > -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer