Move logic out of symbol_find_demangled_name
[deliverable/binutils-gdb.git] / gdb / d-lang.c
index b25136dfb22fc5ec9a383132e8bbcd541022decf..2eb7ffa108da054c2b5f5bec3cb988e617610d70 100644 (file)
@@ -55,6 +55,15 @@ d_demangle (const char *symbol, int options)
   return gdb_demangle (symbol, options | DMGL_DLANG);
 }
 
+/* la_sniff_from_mangled_name implementation for D.  */
+
+static int
+d_sniff_from_mangled_name (const char *mangled, char **demangled)
+{
+  *demangled = d_demangle (mangled, 0);
+  return *demangled != NULL;
+}
+
 /* Table mapping opcodes into strings for printing operators
    and precedences of the operators.  */
 static const struct op_print d_op_print_tab[] =
@@ -223,6 +232,7 @@ static const struct language_defn d_language_defn =
   d_lookup_symbol_nonlocal,
   basic_lookup_transparent_type,
   d_demangle,                  /* Language specific symbol demangler.  */
+  d_sniff_from_mangled_name,
   NULL,                                /* Language specific
                                   class_name_from_physname.  */
   d_op_print_tab,              /* Expression operators for printing.  */
This page took 0.023811 seconds and 4 git commands to generate.