X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fgo-lang.c;h=96be458f3520c44abc8151b2596c4d6d2af7b509;hb=b8162e5ac9e052b2a88912b729081600972e854c;hp=b48467d838c5fb12a797ce126b076ecc8847d89c;hpb=61012eef8463764ccd9117dc1c9bc43cc452b7cc;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/go-lang.c b/gdb/go-lang.c index b48467d838..96be458f35 100644 --- a/gdb/go-lang.c +++ b/gdb/go-lang.c @@ -1,6 +1,6 @@ /* Go language support routines for GDB, the GNU debugger. - Copyright (C) 2012-2015 Free Software Foundation, Inc. + Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of GDB. @@ -77,8 +77,8 @@ gccgo_string_p (struct type *type) struct type *type0 = TYPE_FIELD_TYPE (type, 0); struct type *type1 = TYPE_FIELD_TYPE (type, 1); - CHECK_TYPEDEF (type0); - CHECK_TYPEDEF (type1); + type0 = check_typedef (type0); + type1 = check_typedef (type1); if (TYPE_CODE (type0) == TYPE_CODE_PTR && strcmp (TYPE_FIELD_NAME (type, 0), "__data") == 0 @@ -87,7 +87,7 @@ gccgo_string_p (struct type *type) { struct type *target_type = TYPE_TARGET_TYPE (type0); - CHECK_TYPEDEF (target_type); + target_type = check_typedef (target_type); if (TYPE_CODE (target_type) == TYPE_CODE_INT && TYPE_LENGTH (target_type) == 1 @@ -119,7 +119,7 @@ sixg_string_p (struct type *type) enum go_type go_classify_struct_type (struct type *type) { - CHECK_TYPEDEF (type); + type = check_typedef (type); /* Recognize strings as they're useful to be able to print without pretty-printers. */ @@ -195,9 +195,9 @@ unpack_mangled_go_symbol (const char *mangled_name, /* Pointer to "N" if valid "N_" found. */ char *method_type; /* Pointer to the first '.'. */ - char *first_dot; + const char *first_dot; /* Pointer to the last '.'. */ - char *last_dot; + const char *last_dot; /* Non-zero if we saw a pointer indicator. */ int saw_pointer; @@ -379,7 +379,7 @@ go_demangle (const char *mangled_name, int options) } obstack_grow_str0 (&tempbuf, ""); - result = xstrdup (obstack_finish (&tempbuf)); + result = xstrdup ((const char *) obstack_finish (&tempbuf)); obstack_free (&tempbuf, NULL); xfree (name_buf); return result; @@ -478,7 +478,7 @@ static const struct op_print go_op_print_tab[] = {"unsafe.Sizeof ", UNOP_SIZEOF, PREC_PREFIX, 0}, {"++", UNOP_POSTINCREMENT, PREC_SUFFIX, 0}, {"--", UNOP_POSTDECREMENT, PREC_SUFFIX, 0}, - {NULL, 0, 0, 0} + {NULL, OP_NULL, PREC_SUFFIX, 0} }; enum go_primitive_types { @@ -655,7 +655,7 @@ static struct gdbarch_data *go_type_data; const struct builtin_go_type * builtin_go_type (struct gdbarch *gdbarch) { - return gdbarch_data (gdbarch, go_type_data); + return (const struct builtin_go_type *) gdbarch_data (gdbarch, go_type_data); } extern initialize_file_ftype _initialize_go_language;