+2019-09-29 Christian Biesinger <cbiesinger@google.com>
+
+ * minsyms.h (msymbol_hash): Document that this is a case-insensitive
+ hash and why.
+ * objfiles.h (struct objfile_per_bfd_storage) <demangled_names_hash,
+ msymbol_hash, msymbol_demangled_hash>: Improve comments.
+
2019-09-30 Simon Marchi <simon.marchi@polymtl.ca>
* psymtab.c (add_psymbol_to_list): Move comment to psympriv.h.
minimal_symbol *minsym,
CORE_ADDR *func_address_p = NULL);
-/* Compute a hash code for the string argument. */
+/* Compute a hash code for the string argument. Unlike htab_hash_string,
+ this is a case-insensitive hash to support "set case-sensitive off". */
unsigned int msymbol_hash (const char *);
struct gdbarch *gdbarch = NULL;
/* Hash table for mapping symbol names to demangled names. Each
- entry in the hash table is actually two consecutive strings,
- both null-terminated; the first one is a mangled or linkage
- name, and the second is the demangled name or just a zero byte
- if the name doesn't demangle. */
+ entry in the hash table is a demangled_name_entry struct, storing the
+ language and two consecutive strings, both null-terminated; the first one
+ is a mangled or linkage name, and the second is the demangled name or just
+ a zero byte if the name doesn't demangle. */
htab_up demangled_names_hash;
bool minsyms_read : 1;
- /* This is a hash table used to index the minimal symbols by name. */
+ /* This is a hash table used to index the minimal symbols by (mangled)
+ name. */
minimal_symbol *msymbol_hash[MINIMAL_SYMBOL_HASH_SIZE] {};
/* This hash table is used to index the minimal symbols by their
- demangled names. */
+ demangled names. Uses a language-specific hash function via
+ search_name_hash. */
minimal_symbol *msymbol_demangled_hash[MINIMAL_SYMBOL_HASH_SIZE] {};