*** empty log message ***
[binutils-gdb.git] / gdb / c-valprint.c
index e2a5b954e39c3d358a2be8567a40607834f14de9..f0895a4d9c1ee462d120fef5055011598c648370 100644 (file)
@@ -180,7 +180,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
 
          /* Print arrays of textual chars with a string syntax, as
             long as the entire array is valid.  */
-          if (c_textual_element_type (unresolved_elttype, options->format)
+          if (!TYPE_VECTOR (type)
+             && c_textual_element_type (unresolved_elttype, options->format)
              && value_bits_valid (original_value,
                                   TARGET_CHAR_BIT * embedded_offset,
                                   TARGET_CHAR_BIT * TYPE_LENGTH (type)))
@@ -221,7 +222,8 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
                {
                  i = 0;
                }
-             val_print_array_elements (type, valaddr + embedded_offset, address, stream,
+             val_print_array_elements (type, valaddr + embedded_offset,
+                                       address + embedded_offset, stream,
                                        recurse, original_value, options, i);
              fprintf_filtered (stream, "}");
            }
@@ -557,7 +559,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
       break;
 
     case TYPE_CODE_ERROR:
-      fprintf_filtered (stream, _("<error type>"));
+      fprintf_filtered (stream, "%s", TYPE_ERROR_NAME (type));
       break;
 
     case TYPE_CODE_UNDEF: