diff options
author | Fred Fish <fnf@specifix.com> | 1992-04-15 05:42:00 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-04-15 05:42:00 +0000 |
commit | 4a11eef2ebf99f527ee5452386a5f2a099ed6b8b (patch) | |
tree | 8a8e090f544dde28aaa060b49ac7c6eee14109b3 /gdb/mipsread.c | |
parent | e4b9dd935bd566dc1f46ee4c1a6f3c31755318d5 (diff) | |
download | gdb-4a11eef2ebf99f527ee5452386a5f2a099ed6b8b.zip gdb-4a11eef2ebf99f527ee5452386a5f2a099ed6b8b.tar.gz gdb-4a11eef2ebf99f527ee5452386a5f2a099ed6b8b.tar.bz2 |
Add TYPE_FLAG_FUND_TYPE bit to the flags member of the type structure,
and use it to decide when to print the actual type name rather than
trying to invent the name of a fundamental type. This clears up the
confusion between int/long when they are the same sizes, removes one
obstacle to multi-language support (previously valprint.c thought
everything was a C type), and allows gdb to support distinctions between
explicitly and implicitly signed types when the compiler supports such
distinction in the debug output (as does every ANSI compiler I tested
except for gcc).
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r-- | gdb/mipsread.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 55ec960..433beb3 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -3053,24 +3053,30 @@ _initialize_mipsread () add_symtab_fns (&ecoff_sym_fns); /* Missing basic types */ + builtin_type_string = - init_type (TYPE_CODE_PASCAL_ARRAY, - 1, 0, "string", - (struct objfile *) NULL); + init_type(TYPE_CODE_PASCAL_ARRAY, + TARGET_CHAR_BIT / TARGET_CHAR_BIT, + TYPE_FLAG_FUND_TYPE, "string", + (struct objfile *) NULL); builtin_type_complex = init_type(TYPE_CODE_FLT, - 2 * sizeof(float), 0, "complex", + TARGET_COMPLEX_BIT / TARGET_CHAR_BIT, + TYPE_FLAG_FUND_TYPE, "complex", (struct objfile *) NULL); builtin_type_double_complex = init_type(TYPE_CODE_FLT, - 2 * sizeof(double), 0, "double_complex", + TARGET_DOUBLE_COMPLEX_BIT / TARGET_CHAR_BIT, + TYPE_FLAG_FUND_TYPE, "double complex", (struct objfile *) NULL); builtin_type_fixed_dec = - init_type(TYPE_CODE_INT, sizeof(int), - 0, "fixed_decimal", + init_type(TYPE_CODE_INT, + TARGET_INT_BIT / TARGET_CHAR_BIT, + TYPE_FLAG_FUND_TYPE, "fixed decimal", (struct objfile *) NULL); builtin_type_float_dec = - init_type(TYPE_CODE_FLT, sizeof(double), - 0, "floating_decimal", + init_type(TYPE_CODE_FLT, + TARGET_DOUBLE_BIT / TARGET_CHAR_BIT, + TYPE_FLAG_FUND_TYPE, "floating decimal", (struct objfile *) NULL); } |