From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23998 invoked by alias); 9 Feb 2003 22:37:09 -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 23991 invoked from network); 9 Feb 2003 22:37:09 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 9 Feb 2003 22:37:09 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18i1xX-0006Tr-00 for ; Sun, 09 Feb 2003 18:38:07 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18i04R-0001BD-00 for ; Sun, 09 Feb 2003 17:37:07 -0500 Date: Sun, 09 Feb 2003 22:37:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: RFA/symtab: (Almost) always hash blocks when searching them Message-ID: <20030209223707.GA4518@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030209220321.GA19572@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030209220321.GA19572@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00254.txt.bz2 On Sun, Feb 09, 2003 at 05:03:21PM -0500, Daniel Jacobowitz wrote: > I'm working on modifying the symbol lookup functions to return multiple > symbols when there are multiple possible matches, and I didn't want to have > to modify all three kinds of binary search in lookup_block_symbol. First I > tried fixing mdebugread.c to generate hashed blocks properly; it was too > messy, and I couldn't build an mdebug toolchain to test with [mips-ecoff was > my best guess, and it's been broken for months. Part of it was my fault and > then GCC started segfaulting after I fixed that]. > > So instead, I added a new function to hash a block retroactively. Then, in > lookup_block_symbol, where we would previously have done a binary search we > instead hash the block and do a hash table search. Amortized cost is > somewhat lower, complexity cost is much lower. I like it. > > I also updated the comments; the bit about not matching demangled names was > out of date. Symbols are hashed by their demangled name, if any. > > Is this patch OK? Never mind for now. I'm solving my problem in a different way, and I didn't notice the constness issue with this patch before I posted it. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer