/* Support for printing Fortran values for GDB, the GNU debugger.
Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2003, 2005, 2006,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
(fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
CORE_ADDR address, struct ui_file *stream, int recurse,
const struct value_print_options *options)
{
+ struct gdbarch *gdbarch = get_type_arch (type);
unsigned int i = 0; /* Number of characters printed */
struct type *elttype;
LONGEST val;
{
case TYPE_CODE_STRING:
f77_get_dynamic_length_of_aggregate (type);
- LA_PRINT_STRING (stream, valaddr, TYPE_LENGTH (type), 1, 0, options);
+ LA_PRINT_STRING (stream, builtin_type (gdbarch)->builtin_char,
+ valaddr, TYPE_LENGTH (type), 0, options);
break;
case TYPE_CODE_ARRAY:
&& TYPE_CODE (elttype) == TYPE_CODE_INT
&& (options->format == 0 || options->format == 's')
&& addr != 0)
- i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream,
+ i = val_print_string (TYPE_TARGET_TYPE (type), addr, -1, stream,
options);
/* Return number of characters printed, including the terminating
{
fputs_filtered (" ", stream);
LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr),
- stream);
+ type, stream);
}
}
break;