From: Richard Stallman Date: Wed, 9 Sep 1992 00:27:40 +0000 (+0000) Subject: (dbxout_type_fields): Handle nameless subrecords for Pascal. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=15a5b8a22ae6091ce9a3ff5431580d39cdc180d6;p=gcc.git (dbxout_type_fields): Handle nameless subrecords for Pascal. (dbxout_type): Handle CHAR_TYPE, BOOLEAN_TYPE. FILE_TYPE, SET_TYPE. From-SVN: r2079 --- diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 292e4a28cd6..ba1a550e993 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -561,12 +561,14 @@ dbxout_type_fields (type) tree type; { tree tem; + /* Output the name, type, position (in bits), size (in bits) of each + field. */ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem)) { - /* Output the name, type, position (in bits), size (in bits) - of each field. */ + /* For nameless subunions and subrecords, treat their fields as ours. */ if (DECL_NAME (tem) == NULL_TREE - && TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE) + && (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE + || TREE_CODE (TREE_TYPE (tem)) == RECORD_TYPE)) dbxout_type_fields (TREE_TYPE (tem)); /* Omit here local type decls until we know how to support them. */ else if (TREE_CODE (tem) == TYPE_DECL) @@ -989,6 +991,44 @@ dbxout_type (type, full, show_arg_types) CHARS (16); break; + case CHAR_TYPE: + /* Output the type `char' as a subrange of itself. + That is what pcc seems to do. */ + fprintf (asmfile, "r%d;0;%d;", TYPE_SYMTAB_ADDRESS (char_type_node), + TREE_UNSIGNED (type) ? 255 : 127); + CHARS (9); + break; + + case BOOLEAN_TYPE: /* Define as enumeral type (False, True) */ + fprintf (asmfile, "eFalse:0,True:1,;"); + CHARS (17); + break; + + case FILE_TYPE: + putc ('d', asmfile); + CHARS (1); + dbxout_type (TREE_TYPE (type), 0); + break; + + case COMPLEX_TYPE: + /* Differs from the REAL_TYPE by its new data type number */ + + if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE) + { + fprintf (asmfile, "r%d;%d;0;", + TYPE_SYMTAB_ADDRESS (type), + TREE_INT_CST_LOW (size_in_bytes (TREE_TYPE (type)))); + CHARS (15); /* The number is propably incorrect here */ + } else + abort (); /* What to do with CSImode complex? */ + break; + + case SET_TYPE: + putc ('S', asmfile); + CHARS (1); + dbxout_type (TREE_TYPE (type), 0); + break; + case ARRAY_TYPE: /* Output "a" followed by a range type definition for the index type of the array