Fix gdb build with -std=gnu++11
[deliverable/binutils-gdb.git] / gdb / go-lang.c
index b8617cb162daa8b32bd441f61c3528fd0fc0cfb2..6473468d4d96ba9a403d51a0bd2b0d458ea627dc 100644 (file)
@@ -130,6 +130,16 @@ go_classify_struct_type (struct type *type)
   return GO_TYPE_NONE;
 }
 
+/* Return true if TYPE is a string.  */
+
+static bool
+go_is_string_type_p (struct type *type)
+{
+  type = check_typedef (type);
+  return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+         && go_classify_struct_type (type) == GO_TYPE_STRING);
+}
+
 /* Subroutine of unpack_mangled_go_symbol to simplify it.
    Given "[foo.]bar.baz", store "bar" in *PACKAGEP and "baz" in *OBJECTP.
    We stomp on the last '.' to nul-terminate "bar".
@@ -612,6 +622,7 @@ extern const struct language_defn go_language_defn =
   &default_varobj_ops,
   NULL,
   NULL,
+  go_is_string_type_p,
   "{...}"                      /* la_struct_too_deep_ellipsis */
 };
 
This page took 0.023442 seconds and 4 git commands to generate.