(1 or 2) of the character. */
void
-ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
+ada_emit_char (int c, struct type *type, struct ui_file *stream,
+ int quoter, int type_len)
{
if (type_len != 2)
type_len = 1;
}
void
-ada_printchar (int c, struct ui_file *stream)
+ada_printchar (int c, struct type *type, struct ui_file *stream)
{
fputs_filtered ("'", stream);
- ada_emit_char (c, stream, '\'', 1);
+ ada_emit_char (c, type, stream, '\'', 1);
fputs_filtered ("'", stream);
}
break;
case TYPE_CODE_CHAR:
- LA_PRINT_CHAR ((unsigned char) val, stream);
+ LA_PRINT_CHAR ((unsigned char) val, type, stream);
break;
case TYPE_CODE_BOOL:
*/
static void
-printstr (struct ui_file *stream, const gdb_byte *string,
+printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
unsigned int length, int force_ellipses, int type_len,
const struct value_print_options *options)
{
in_quotes = 0;
}
fputs_filtered ("'", stream);
- ada_emit_char (char_at (string, i, type_len), stream, '\'',
+ ada_emit_char (char_at (string, i, type_len), elttype, stream, '\'',
type_len);
fputs_filtered ("'", stream);
fprintf_filtered (stream, _(" <repeats %u times>"), reps);
fputs_filtered ("\"", stream);
in_quotes = 1;
}
- ada_emit_char (char_at (string, i, type_len), stream, '"',
+ ada_emit_char (char_at (string, i, type_len), elttype, stream, '"',
type_len);
things_printed += 1;
}
}
void
-ada_printstr (struct ui_file *stream, const gdb_byte *string,
- unsigned int length, int width, int force_ellipses,
+ada_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
+ unsigned int length, int force_ellipses,
const struct value_print_options *options)
{
- printstr (stream, string, length, force_ellipses, width, options);
+ printstr (stream, type, string, length, force_ellipses, TYPE_LENGTH (type),
+ options);
}
len = temp_len;
}
- printstr (stream, valaddr, len, 0, eltlen, options);
+ printstr (stream, elttype, valaddr, len, 0, eltlen, options);
result = len;
}
else
{
fputs_filtered (" ", stream);
ada_printchar ((unsigned char) unpack_long (type, valaddr),
- stream);
+ type, stream);
}
}
return 0;