Symbol lookup performance

Randolph Chung randolph@tausq.org
Wed Nov 10 22:13:00 GMT 2004


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/



More information about the Gdb mailing list