aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-09-29 20:15:38 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-09-30 11:21:46 -0500
commitc7ee338a2dc3570c830e6897940f3955c5f632b2 (patch)
treecc6e9ec3b3d2c9c04ee9f7cccdb1ba464864fa92 /gdb/objfiles.h
parent703a86c2fa74e6c998ed24a8823658119f176b2d (diff)
downloadgdb-c7ee338a2dc3570c830e6897940f3955c5f632b2.zip
gdb-c7ee338a2dc3570c830e6897940f3955c5f632b2.tar.gz
gdb-c7ee338a2dc3570c830e6897940f3955c5f632b2.tar.bz2
Improve some comments about msymbol handling
This just clarifies some comments about the hashtables involved in msymbols. gdb/ChangeLog: 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.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 68d36d4..dbd06c0 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -258,10 +258,10 @@ struct objfile_per_bfd_storage
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;
@@ -305,12 +305,14 @@ struct objfile_per_bfd_storage
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] {};