gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / go-lang.c
index 7340a334e66dc387d54c05ac77f3ba5fef107eee..3975dfcb482ee2c0400e4ce9cfe3b45dc430013e 100644 (file)
@@ -396,15 +396,6 @@ 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.  */
 
@@ -541,18 +532,13 @@ extern const struct language_data go_language_data =
   c_printchar,                 /* Print a character constant.  */
   c_printstr,                  /* Function to print string constant.  */
   c_emit_char,                 /* Print a single char.  */
-  go_print_type,               /* Print a type using appropriate syntax.  */
   c_print_typedef,             /* Print a typedef using appropriate
                                   syntax.  */
   go_value_print_inner,                /* la_value_print_inner */
   c_value_print,               /* Print a top-level value.  */
-  NULL,                                /* Language specific skip_trampoline.  */
   NULL,                                /* name_of_this */
   false,                       /* la_store_sym_names_in_linkage_form_p */
   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.  */
@@ -562,11 +548,8 @@ extern const struct language_data go_language_data =
   default_collect_symbol_completion_matches,
   c_watch_location_expression,
   NULL,                                /* la_get_symbol_name_matcher */
-  iterate_over_symbols,
-  default_search_name_hash,
   &default_varobj_ops,
   NULL,
-  NULL,
   go_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
 };
@@ -632,6 +615,30 @@ public:
     lai->bool_type_symbol = "bool";
     lai->bool_type_default = builtin->builtin_bool;
   }
+
+  /* See language.h.  */
+  bool sniff_from_mangled_name (const char *mangled,
+                               char **demangled) const override
+  {
+    *demangled = go_demangle (mangled, 0);
+    return *demangled != NULL;
+  }
+
+  /* See language.h.  */
+
+  char *demangle (const char *mangled, int options) const override
+  {
+    return go_demangle (mangled, options);
+  }
+
+  /* See language.h.  */
+
+  void print_type (struct type *type, const char *varstring,
+                  struct ui_file *stream, int show, int level,
+                  const struct type_print_options *flags) const override
+  {
+    go_print_type (type, varstring, stream, show, level, flags);
+  }
 };
 
 /* Single instance of the Go language class.  */
This page took 0.023418 seconds and 4 git commands to generate.