diff options
Diffstat (limited to 'gdb/f-typeprint.c')
-rw-r--r-- | gdb/f-typeprint.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index d55c1657c9c..ad93152273d 100644 --- a/gdb/f-typeprint.c +++ b/gdb/f-typeprint.c @@ -368,14 +368,22 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show, break; case TYPE_CODE_STRUCT: - fprintfi_filtered (level, stream, "Type "); + case TYPE_CODE_UNION: + if (TYPE_CODE (type) == TYPE_CODE_UNION) + fprintfi_filtered (level, stream, "Type, C_Union :: "); + else + fprintfi_filtered (level, stream, "Type "); fputs_filtered (TYPE_TAG_NAME (type), stream); fputs_filtered ("\n", stream); for (index = 0; index < TYPE_NFIELDS (type); index++) { - f_print_type (TYPE_FIELD_TYPE (type, index), "", stream, show, level + 4); + f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show, + level + 4); fputs_filtered (" :: ", stream); - fputs_filtered (TYPE_FIELD_NAME (type, index), stream); + fprintfi_filtered (level, stream, "%s", + TYPE_FIELD_NAME (type, index)); + f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index), + stream, 0, 0, 0); fputs_filtered ("\n", stream); } fprintfi_filtered (level, stream, "End Type "); |