Fix PR cli/18053
[deliverable/binutils-gdb.git] / gdb / go-valprint.c
index 3be4927dcc12c3e17b7c0cb02028fbc262eb1bb1..34ed8e09074e58453e40c5146ab540b41c49d743 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing Go values for GDB, the GNU debugger.
 
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,7 +37,7 @@
 
 static void
 print_go_string (struct type *type, const gdb_byte *valaddr,
-                int embedded_offset, CORE_ADDR address,
+                LONGEST embedded_offset, CORE_ADDR address,
                 struct ui_file *stream, int recurse,
                 const struct value *val,
                 const struct value_print_options *options)
@@ -64,7 +64,10 @@ print_go_string (struct type *type, const gdb_byte *valaddr,
 
   /* TODO(dje): Print address of struct or actual string?  */
   if (options->addressprint)
-    fputs_filtered (paddress (gdbarch, addr), stream);
+    {
+      fputs_filtered (paddress (gdbarch, addr), stream);
+      fputs_filtered (" ", stream);
+    }
 
   if (length < 0)
     {
@@ -88,7 +91,7 @@ go_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
              const struct value *val,
              const struct value_print_options *options)
 {
-  CHECK_TYPEDEF (type);
+  type = check_typedef (type);
 
   switch (TYPE_CODE (type))
     {
This page took 0.024181 seconds and 4 git commands to generate.