This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Symbol lookup performance
- From: Randolph Chung <randolph at tausq dot org>
- To: gdb at sources dot redhat dot com
- Date: Wed, 10 Nov 2004 12:23:23 -0800
- Subject: Symbol lookup performance
- Reply-to: Randolph Chung <randolph at tausq dot org>
parse.c has this bit of code:
if (SYMBOLS_CAN_START_WITH_DOLLAR)
{
struct symbol *sym = NULL;
struct minimal_symbol *msym = NULL;
/* On HP-UX, certain system routines (millicode) have names beginning
with $ or $$, e.g. $$dyncall, which handles inter-space procedure
calls on PA-RISC. Check for those, first. */
/* This code is not enabled on non HP-UX systems, since worst case
symbol table lookup performance is awful, to put it mildly. */
sym = lookup_symbol (copy_name (str), (struct block *) NULL,
VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL);
Is that comment about worst case symbol lookup performance still valid?
Looking at some of list archives it seems like this problem has been
tackled a bit before, and if i'm reading the code right lookup_symbol
uses reasonably efficient algorithms to do the lookup. If so, can we
remove the hppa-only SYMBOLS_CAN_START_WITH_DOLLAR check?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/