Per-language symbol name hashing algorithm
[deliverable/binutils-gdb.git] / gdb / language.h
index d4ca900834dcb7a4519ada07ccc537fe8b68b42f..64ccfccdab64f2a61c8b0b930ad014e2e8f1661a 100644 (file)
@@ -392,6 +392,11 @@ struct language_defn
       (const struct block *block, const char *name, domain_enum domain,
        gdb::function_view<symbol_found_callback_ftype> callback);
 
+    /* Hash the given symbol search name.  Use
+       default_search_name_hash if no special treatment is
+       required.  */
+    unsigned int (*la_search_name_hash) (const char *name);
+
     /* Various operations on varobj.  */
     const struct lang_varobj_ops *la_varobj_ops;
 
@@ -611,6 +616,14 @@ void default_print_typedef (struct type *type, struct symbol *new_symbol,
 void default_get_string (struct value *value, gdb_byte **buffer, int *length,
                         struct type **char_type, const char **charset);
 
+/* Default name hashing function.  */
+
+/* Produce an unsigned hash value from SEARCH_NAME that is consistent
+   with strcmp_iw, strcmp, and, at least on Ada symbols, wild_match.
+   That is, two identifiers equivalent according to any of those three
+   comparison operators hash to the same value.  */
+extern unsigned int default_search_name_hash (const char *search_name);
+
 void c_get_string (struct value *value, gdb_byte **buffer, int *length,
                   struct type **char_type, const char **charset);
 
This page took 0.024058 seconds and 4 git commands to generate.