From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: RFA/symtab: (Almost) always hash blocks when searching them
Date: Sun, 09 Feb 2003 22:37:00 -0000 [thread overview]
Message-ID: <20030209223707.GA4518@nevyn.them.org> (raw)
In-Reply-To: <20030209220321.GA19572@nevyn.them.org>
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
next prev parent reply other threads:[~2003-02-09 22:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-09 22:03 Daniel Jacobowitz
2003-02-09 22:37 ` Daniel Jacobowitz [this message]
2003-02-10 19:14 ` David Carlton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030209223707.GA4518@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox