aboutsummaryrefslogtreecommitdiff
path: root/gdb/go-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/go-lang.c')
-rw-r--r--gdb/go-lang.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 15ca78b..0a0101d 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -385,6 +385,15 @@ go_demangle (const char *mangled_name, int options)
return result;
}
+/* la_sniff_from_mangled_name for Go. */
+
+static int
+go_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+ *demangled = go_demangle (mangled, 0);
+ return *demangled != NULL;
+}
+
/* Given a Go symbol, return its package or NULL if unknown.
Space for the result is malloc'd, caller must free. */
@@ -584,6 +593,7 @@ static const struct language_defn go_language_defn =
basic_lookup_symbol_nonlocal,
basic_lookup_transparent_type,
go_demangle, /* Language specific symbol demangler. */
+ go_sniff_from_mangled_name,
NULL, /* Language specific
class_name_from_physname. */
go_op_print_tab, /* Expression operators for printing. */