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. */
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,
- 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. */
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 */
};
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. */