From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24654 invoked by alias); 9 Jul 2006 20:36:03 -0000 Received: (qmail 24645 invoked by uid 22791); 9 Jul 2006 20:36:03 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 09 Jul 2006 20:36:01 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fzg0T-0005dM-U9; Sun, 09 Jul 2006 16:35:58 -0400 Date: Sun, 09 Jul 2006 20:36:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: [rft/symtab] Check the sizes of minimal symbols Message-ID: <20060709203557.GA21606@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <20060707035420.GA8071@nevyn.them.org> <200607092026.k69KQKQg027664@elgar.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200607092026.k69KQKQg027664@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00073.txt.bz2 On Sun, Jul 09, 2006 at 10:26:20PM +0200, Mark Kettenis wrote: > > Date: Thu, 6 Jul 2006 23:54:20 -0400 > > From: Daniel Jacobowitz > > > > This is something I've been meaning to do for years, on general principle. > > Much to my surprise it did very good things (~ 15% fails fixed) for my > > native amd64 test run, too, so I have a good example to illustrate with. > > > > In ELF, one of the properties of a symbol is its size. If left unspecified, > > the size is treated as zero. Some hand-written code may lack .size, but > > most compiled code will have it. > > Cool! Unfortunately there seems to be something wrong with the patch. > On i386-pc-openbsd3.9, a gdb segfaults when I try to run anything. > > Program received signal SIGSEGV, Segmentation fault. > 0x1c0066a8 in lookup_minimal_symbol_by_pc_section (pc=469800299, > section=0x800e95fc) at ../../../src/gdb/gdb/minsyms.c:535 > 535 if (MSYMBOL_SIZE (&msymbol[hi]) != 0 I'm just guessing here but... is hi == -1 when that happens? Does adding "hi >= 0 &&" to the front of that if statement help? -- Daniel Jacobowitz CodeSourcery