(msymbol_hash_iw): Likewise. Terminate loop at '(' properly.
* objfiles.h: Increase MINIMAL_SYMBOL_HASH_SIZE to match modern
binaries.
+2001-10-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * minsyms.c (msymbol_hash): Use better hash function.
+ (msymbol_hash_iw): Likewise. Terminate loop at '(' properly.
+
+ * objfiles.h: Increase MINIMAL_SYMBOL_HASH_SIZE to match modern
+ binaries.
+
2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* printcmd.c (print_frame_args): Move symbol iteration explicitly
while (isspace (*string))
++string;
if (*string && *string != '(')
- hash = (31 * hash) + *string;
- ++string;
+ {
+ hash = hash * 67 + *string - 113;
+ ++string;
+ }
}
return hash % MINIMAL_SYMBOL_HASH_SIZE;
}
{
unsigned int hash = 0;
for (; *string; ++string)
- hash = (31 * hash) + *string;
+ hash = hash * 67 + *string - 113;
return hash % MINIMAL_SYMBOL_HASH_SIZE;
}
extern void print_symbol_bcache_statistics (void);
/* Number of entries in the minimal symbol hash table. */
-#define MINIMAL_SYMBOL_HASH_SIZE 349
+#define MINIMAL_SYMBOL_HASH_SIZE 2039
/* Master structure for keeping track of each file from which
gdb reads symbols. There are several ways these get allocated: 1.