From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3112 invoked by alias); 21 Aug 2006 18:30:30 -0000 Received: (qmail 3017 invoked by uid 22791); 21 Aug 2006 18:30:29 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Aug 2006 18:30:20 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k7LITfcp018420; Mon, 21 Aug 2006 20:29:41 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k7LITfnR020337; Mon, 21 Aug 2006 20:29:41 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k7LITfLB004305; Mon, 21 Aug 2006 20:29:41 +0200 (CEST) Date: Tue, 22 Aug 2006 01:35:00 -0000 Message-Id: <200608211829.k7LITfLB004305@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: vapier@gentoo.org CC: gdb-patches@sourceware.org, drow@false.org In-reply-to: <20060820135754.GA17322@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 20 Aug 2006 09:57:54 -0400) Subject: Re: only force symbol lookups with local variables on hppa References: <200608200903.07185.vapier@gentoo.org> <200608201310.k7KDAgwj013347@elgar.sibelius.xs4all.nl> <20060820135754.GA17322@nevyn.them.org> 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-08/txt/msg00149.txt.bz2 > Date: Sun, 20 Aug 2006 09:57:54 -0400 > From: Daniel Jacobowitz > > On Sun, Aug 20, 2006 at 03:10:42PM +0200, Mark Kettenis wrote: > > > From: Mike Frysinger > > > Date: Sun, 20 Aug 2006 09:03:06 -0400 > > > > > > as a follow up to the slow script thread: > > > http://sources.redhat.com/ml/gdb/2006-08/msg00099.html > > > > > > attached patch will change the behavior so symbols with dollar signs > > > in them0 ($) are only looked up when a specific arch says to do so > > > (with hppa being the only one at the moment) > > > -mike > > > > > 2006-08-20 Mike Frysinger > > > > > > * parse.c (write_dollar_variable): Check LOOKUP_DOLLAR_SYMBOLS. > > > * config/pa/tm-hppa.h [LOOKUP_DOLLAR_SYMBOLS]: Define. > > > > Sorry but, this implementation is not acceptable; we want to get rid > > of all the defines in tm.h files (and the files themselves > > eventually), not add more :(. > > As a followup, there are several better options: > > - Set a gdbarch hook. See gdbarch.sh. > - Keep track of the number of symbols found which start with > a '$', probably in each objfile. Only do the lookup if > symbols starting with dollar have been found. > - Just make partial symbol lookups faster. And of these the last two are certainly preferable to the first solution. Actually, I'm afraid the assumption that symbols do not start with a dollar sign isn't true on most platforms: I just created some assembler code that contains such symbols and it assembles, links and runs fine on OpenBSD/i386. I have no doubt that the same will be true on other ELF systems using the GNU toolchain. Mark