diff options
Diffstat (limited to 'gdb/language.c')
-rw-r--r-- | gdb/language.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/language.c b/gdb/language.c index 073039e..2cce56b 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -44,6 +44,7 @@ #include "cp-support.h" #include "frame.h" #include "c-lang.h" +#include "dictionary.h" /* for dict_hash */ #include <algorithm> extern void _initialize_language (void); @@ -703,6 +704,14 @@ default_get_string (struct value *value, gdb_byte **buffer, int *length, error (_("Getting a string is unsupported in this language.")); } +/* See language.h. */ + +unsigned int +default_compute_string_hash (const char *name) +{ + return dict_hash (name); +} + /* Define the language that is no language. */ static int @@ -843,6 +852,7 @@ const struct language_defn unknown_language_defn = c_watch_location_expression, NULL, /* la_get_symbol_name_cmp */ iterate_over_symbols, + default_compute_string_hash, &default_varobj_ops, NULL, NULL, @@ -893,6 +903,7 @@ const struct language_defn auto_language_defn = c_watch_location_expression, NULL, /* la_get_symbol_name_cmp */ iterate_over_symbols, + default_compute_string_hash, &default_varobj_ops, NULL, NULL, |