60 if (msym.minsym != NULL)
94 && strcmp (
TYPE_NAME (target_type),
"uint8") == 0)
140 const char **packagep,
const char **objectp)
144 last_dot = strrchr (buf,
'.');
146 *objectp = last_dot + 1;
148 last_dot = strrchr (buf,
'.');
149 if (last_dot != NULL)
150 *packagep = last_dot + 1;
184 const char **packagep,
185 const char **objectp,
186 const char **method_type_packagep,
187 const char **method_type_objectp,
188 int *method_type_is_pointerp)
192 int len = strlen (mangled_name);
204 *packagep = *objectp = NULL;
205 *method_type_packagep = *method_type_objectp = NULL;
206 *method_type_is_pointerp = 0;
209 if (strcmp (mangled_name,
"__go_init_main") == 0)
211 char *
package = xstrdup ("main");
219 if (strcmp (mangled_name,
"main.main") == 0)
221 char *
package = xstrdup ("main");
242 if (strchr (mangled_name,
'@') != NULL)
245 first_dot = strchr (mangled_name,
'.');
246 if (first_dot == NULL)
252 last_dot = strrchr (mangled_name,
'.');
253 if (last_dot == first_dot)
257 if (last_dot[1] ==
'\0'
258 || last_dot[-1] ==
'.')
263 buf = xstrdup (mangled_name);
267 saw_digit = method_type = NULL;
271 int current = *(
const unsigned char *) --p;
272 int current_is_digit = isdigit (current);
276 if (current_is_digit)
279 && ((p > buf && p[-1] ==
'.')
280 || (p > buf + 1 && p[-1] ==
'p' && p[-2] ==
'.')))
282 if (atoi (p + 1) == strlen (saw_digit + 2))
300 if (current_is_digit && p[1] ==
'_')
308 if (method_type != NULL
310 && (method_type > buf && method_type[-1] !=
'.'))
313 method_type_packagep, method_type_objectp);
315 *method_type_is_pointerp = saw_pointer;
338 struct obstack tempbuf;
341 const char *package_name;
342 const char *object_name;
343 const char *method_type_package_name;
344 const char *method_type_object_name;
345 int method_type_is_pointer;
347 if (mangled_name == NULL)
351 &package_name, &object_name,
352 &method_type_package_name,
353 &method_type_object_name,
354 &method_type_is_pointer);
355 if (name_buf == NULL)
358 obstack_init (&tempbuf);
361 if (method_type_package_name != NULL)
364 if (method_type_is_pointer)
369 if (method_type_is_pointer)
382 result = xstrdup (obstack_finish (&tempbuf));
383 obstack_free (&tempbuf, NULL);
395 const char *package_name;
396 const char *object_name;
397 const char *method_type_package_name;
398 const char *method_type_object_name;
399 int method_type_is_pointer;
405 &package_name, &object_name,
406 &method_type_package_name,
407 &method_type_object_name,
408 &method_type_is_pointer);
410 if (name_buf == NULL)
412 result = xstrdup (package_name);
423 while (block != NULL)
427 if (
function != NULL)
431 if (package_name != NULL)
592 default_make_symbol_completion_list,
struct type * builtin_uint16
void go_print_type(struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
char * go_block_package_name(const struct block *block)
static void go_language_arch_info(struct gdbarch *gdbarch, struct language_arch_info *lai)
#define TYPE_FIELD_NAME(thistype, n)
struct type * builtin_uint32
const char * go_main_name(void)
struct type * arch_boolean_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
#define GDBARCH_OBSTACK_CALLOC(GDBARCH, NR, TYPE)
struct type * builtin_int16
int gdbarch_int_bit(struct gdbarch *gdbarch)
struct type * builtin_complex128
#define TYPE_NAME(thistype)
int gdbarch_ptr_bit(struct gdbarch *gdbarch)
struct type * arch_float_type(struct gdbarch *gdbarch, int bit, char *name, const struct floatformat **floatformats)
struct type * arch_complex_type(struct gdbarch *gdbarch, char *name, struct type *target_type)
void * gdbarch_data(struct gdbarch *gdbarch, struct gdbarch_data *data)
initialize_file_ftype _initialize_go_language
struct type * builtin_int
struct value * default_read_var_value(struct symbol *var, struct frame_info *frame)
struct type * builtin_int8
static void unpack_package_and_object(char *buf, const char **packagep, const char **objectp)
static int gccgo_string_p(struct type *type)
struct type * string_char_type
char * go_symbol_package_name(const struct symbol *sym)
#define TYPE_FIELD_TYPE(thistype, n)
void add_language(const struct language_defn *lang)
void c_get_string(struct value *value, gdb_byte **buffer, int *length, struct type **char_type, const char **charset)
#define GDBARCH_OBSTACK_ZALLOC(GDBARCH, TYPE)
struct type * builtin_int32
#define BLOCK_FUNCTION(bl)
struct type * arch_character_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
struct type * builtin_char
char * default_word_break_characters(void)
const struct exp_descriptor exp_descriptor_c
struct type * bool_type_default
struct type * builtin_uint8
void null_post_parser(struct expression **exp, int void_context_p)
struct type * builtin_int64
void initialize_file_ftype(void)
void c_emit_char(int c, struct type *type, struct ui_file *stream, int quoter)
struct type * builtin_uintptr
void go_val_print(struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options)
const char * bool_type_symbol
int default_pass_by_reference(struct type *type)
const struct builtin_go_type * builtin_go_type(struct gdbarch *gdbarch)
struct type * basic_lookup_transparent_type(const char *name)
static int sixg_string_p(struct type *type)
#define BLOCK_SUPERBLOCK(bl)
#define SYMBOL_LINKAGE_NAME(symbol)
void iterate_over_symbols(const struct block *block, const char *name, const domain_enum domain, symbol_found_callback_ftype *callback, void *data)
static int startswith(const char *string, const char *pattern)
int go_parse(struct parser_state *par_state)
struct type * builtin_void
void default_print_array_index(struct value *index_value, struct ui_file *stream, const struct value_print_options *options)
struct type * arch_integer_type(struct gdbarch *gdbarch, int bit, int unsigned_p, char *name)
enum go_type go_classify_struct_type(struct type *type)
void c_print_typedef(struct type *, struct symbol *, struct ui_file *)
struct type * builtin_uint64
struct type * builtin_float64
struct type * builtin_complex64
void c_printstr(struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *user_encoding, int force_ellipses, const struct value_print_options *options)
static char * unpack_mangled_go_symbol(const char *mangled_name, const char **packagep, const char **objectp, const char **method_type_packagep, const char **method_type_objectp, int *method_type_is_pointerp)
#define TYPE_TARGET_TYPE(thistype)
#define TYPE_CODE(thistype)
#define default_varobj_ops
#define TYPE_NFIELDS(thistype)
#define SYMBOL_LANGUAGE(symbol)
#define obstack_grow_str(OBSTACK, STRING)
#define CHECK_TYPEDEF(TYPE)
#define TYPE_TAG_NAME(type)
static const char GO_MAIN_MAIN[]
struct symbol * basic_lookup_symbol_nonlocal(const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain)
#define obstack_grow_str0(OBSTACK, STRING)
void c_printchar(int c, struct type *type, struct ui_file *stream)
struct type * builtin_bool
#define TYPE_LENGTH(thistype)
struct type * arch_type(struct gdbarch *gdbarch, enum type_code code, int length, char *name)
struct type ** primitive_type_vector
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
struct type * builtin_float32
void c_value_print(struct value *, struct ui_file *, const struct value_print_options *)
static void * build_go_types(struct gdbarch *gdbarch)
struct type * builtin_uint
static const struct op_print go_op_print_tab[]
struct gdbarch_data * gdbarch_data_register_post_init(gdbarch_data_post_init_ftype *post_init)
char * go_demangle(const char *mangled_name, int options)
static struct gdbarch_data * go_type_data
const ULONGEST const LONGEST len