From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22765 invoked by alias); 6 Aug 2008 11:18:59 -0000 Received: (qmail 22756 invoked by uid 22791); 6 Aug 2008 11:18:58 -0000 X-Spam-Check-By: sourceware.org Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Aug 2008 11:18:23 +0000 Received: from [10.11.16.99] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Wed, 06 Aug 2008 04:18:09 -0700 X-Server-Uuid: 02CED230-5797-4B57-9875-D5D2FEE4708A Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id 488952B1; Wed, 6 Aug 2008 04:18:09 -0700 (PDT) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.11.18.52]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id 3434C2B0; Wed, 6 Aug 2008 04:18:09 -0700 (PDT) Received: from mail-irva-13.broadcom.com (mail-irva-13.broadcom.com [10.11.16.103]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id HBE03856; Wed, 6 Aug 2008 04:18:05 -0700 (PDT) Received: from NT-IRVA-0752.brcm.ad.broadcom.com (nt-irva-0752 [10.8.194.67]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id A5AE674CFE; Wed, 6 Aug 2008 04:18:05 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: Bug handling zero sized symbols in minsyms.c Date: Wed, 06 Aug 2008 11:18:00 -0000 Message-ID: In-Reply-To: References: <1215020690.3601.1592.camel@localhost.localdomain> From: "Robert Norton" To: "Robert Norton" , "Michael Snyder" cc: gdb@sourceware.org X-WSS-ID: 648757FB4E0107891274-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00097.txt.bz2 > -----Original Message----- > From: gdb-owner@sourceware.org=20 > [mailto:gdb-owner@sourceware.org] On Behalf Of Robert Norton > Sent: 03 July 2008 11:17 > To: Michael Snyder > Cc: gdb@sourceware.org > Subject: RE: Bug handling zero sized symbols in minsyms.c >=20 > > -----Original Message----- > > From: Michael Snyder [mailto:msnyder@specifix.com]=20 > > Sent: 02 July 2008 18:45 > > To: Robert Norton > > Cc: gdb@sourceware.org > > Subject: Re: Bug handling zero sized symbols in minsyms.c > >=20 > > On Wed, 2008-07-02 at 09:58 -0700, Robert Norton wrote: > > > Hi, > > >=20 > > > In minsyms.c:lookup_minimal_symbol_by_pc_section() there is=20 > > some code > > > which attempts to prefer symbols with sizes over those with=20 > > zero size. > > > This is quite useful[1]. Unfortunately the present code=20 > > will only work > > > if there is at most one zero-sized symbol. The fix is=20 > > around line 503: > > >=20 > > > if (MSYMBOL_SIZE (&msymbol[hi]) =3D=3D 0 > > > && best_zero_sized =3D=3D -1) > > > { > > > best_zero_sized =3D hi; > > > hi--;=20=20=20=20=20=20=20=20=20=20 > > > continue;=20=20=20=20=20=20 > > > } > > >=20 > > > SHOULD be: > > >=20 > > > if (MSYMBOL_SIZE (&msymbol[hi]) =3D=3D 0) > > > { > > > if (best_zero_sized =3D=3D -1) > > > best_zero_sized =3D hi; > > > hi--; > > > continue; > > > } > > >=20 > > > We keep the highest zero-sized symbol as the best but continue to > > > iterate backwards until we hit a non-zero-sized symbol or=20 > run out of > > > symbols. It's pretty clear that this is what was originally=20 > > intended. > >=20 > > Your change is good, thanks. > >=20 > > > I can get copyright assigment for this if required=20 > although it seems > > > pretty trivial... > >=20 > > Not necessary, but feel free to if you'd like. > > I think this is at least the second change you've submitted. >=20 > It turns out that we (Broadcom) already have one on file, so=20 > no problems > there. >=20 > > Could you give us a change log entry please? >=20 > How about: >=20 > 2008-07-03 Robert Norton (rnorton@broadcom.com) >=20 > * minsyms.c: Fix a bug with ignoring zero-sized symbols=20 > when looking > up the minsym for a PC. What is the status of this patch? Robert