From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19698 invoked by alias); 3 Apr 2003 21:37:04 -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 19691 invoked from network); 3 Apr 2003 21:37:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 3 Apr 2003 21:37:04 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h33Lb4e10311 for ; Thu, 3 Apr 2003 16:37:04 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h33Lb3J11905 for ; Thu, 3 Apr 2003 16:37:03 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h33Lb2317248 for ; Thu, 3 Apr 2003 16:37:03 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 9F41A2C441; Thu, 3 Apr 2003 16:41:44 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16012.43672.471576.171837@localhost.redhat.com> Date: Thu, 03 Apr 2003 21:37:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com, Kris Warkentin Subject: Re: RFA: tweak minsyms check for GNU v3 symbols In-Reply-To: <20030303035409.GA5850@nevyn.them.org> References: <20030303035409.GA5850@nevyn.them.org> X-SW-Source: 2003-04/txt/msg00057.txt.bz2 Daniel Jacobowitz writes: > This is based on a patch that Kris Warkentin sent out last October, that's > been sitting in my inbox for a while. It's a little more efficient but the > idea is the same. Right now, we consider any _Z symbol to imply GNU v3; but > what we really want is for any _Z symbol _which demangled successfully_ to > imply GNU v3. _Zero is the QNX example of a false positive for the current > check. It's still not perfect, but it's much better. > > Tested in combination with the "set cp-abi" patch, to make sure it behaved > properly; sure enough: > - we still get GNU v3 for a v3 application > - we no longer get GNU v3 for a v2 application containing _Zero (before > the patch, we did). > > Is this OK? > I am back. yey. approved, sure. elena > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer > > 2003-03-02 Daniel Jacobowitz > > * minsyms.c (install_minimal_symbols): Only switch to gnu-v3 mode > if the linkage name demangled successfully. > > Index: minsyms.c > =================================================================== > RCS file: /cvs/src/src/gdb/minsyms.c,v > retrieving revision 1.26 > diff -u -p -r1.26 minsyms.c > --- minsyms.c 25 Feb 2003 21:36:18 -0000 1.26 > +++ minsyms.c 2 Mar 2003 18:38:28 -0000 > @@ -918,8 +918,14 @@ install_minimal_symbols (struct objfile > > for (i = 0; i < mcount; i++) > { > - const char *name = DEPRECATED_SYMBOL_NAME (&objfile->msymbols[i]); > - if (name[0] == '_' && name[1] == 'Z') > + /* If a symbol's name starts with _Z and was successfully > + demangled, then we can assume we've found a GNU v3 symbol. > + For now we set the C++ ABI globally; if the user is > + mixing ABIs then the user will need to "set cp-abi" > + manually. */ > + const char *name = SYMBOL_LINKAGE_NAME (&objfile->msymbols[i]); > + if (name[0] == '_' && name[1] == 'Z' > + && SYMBOL_DEMANGLED_NAME (&objfile->msymbols[i]) != NULL) > { > switch_to_cp_abi ("gnu-v3"); > break;