+2016-05-17 Tom Tromey <tom@tromey.com>
+
+ * valprint.h (struct generic_val_print_array) <array_start,
+ array_end>: New fields.
+ * valprint.c (generic_val_print_array): Add "decorations"
+ parameter. Use "array_start", "array_end".
+ (generic_val_print) <TYPE_CODE_ARRAY>: Update.
+ * p-valprint.c (p_decorations): Update.
+ * m2-valprint.c (m2_decorations): Update.
+ * f-valprint.c (f_decorations): Update.
+ * c-valprint.c (c_decorations): Update.
+
2016-05-17 Tom Tromey <tom@tromey.com>
* NEWS: Add "maint selftest" entry.
static void
generic_val_print_array (struct type *type, const gdb_byte *valaddr,
- int embedded_offset, CORE_ADDR address,
- struct ui_file *stream, int recurse,
- const struct value *original_value,
- const struct value_print_options *options)
+ int embedded_offset, CORE_ADDR address,
+ struct ui_file *stream, int recurse,
+ const struct value *original_value,
+ const struct value_print_options *options,
+ const struct
+ generic_val_print_decorations *decorations)
{
struct type *unresolved_elttype = TYPE_TARGET_TYPE (type);
struct type *elttype = check_typedef (unresolved_elttype);
print_spaces_filtered (2 + 2 * recurse, stream);
}
- fprintf_filtered (stream, "{");
+ fputs_filtered (decorations->array_start, stream);
val_print_array_elements (type, valaddr, embedded_offset,
address, stream,
recurse, original_value, options, 0);
- fprintf_filtered (stream, "}");
+ fputs_filtered (decorations->array_end, stream);
}
else
{
{
case TYPE_CODE_ARRAY:
generic_val_print_array (type, valaddr, embedded_offset, address, stream,
- recurse, original_value, options);
+ recurse, original_value, options, decorations);
break;
case TYPE_CODE_MEMBERPTR: