aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-04-15 05:42:00 +0000
committerFred Fish <fnf@specifix.com>1992-04-15 05:42:00 +0000
commit4a11eef2ebf99f527ee5452386a5f2a099ed6b8b (patch)
tree8a8e090f544dde28aaa060b49ac7c6eee14109b3 /gdb/c-exp.y
parente4b9dd935bd566dc1f46ee4c1a6f3c31755318d5 (diff)
downloadgdb-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/c-exp.y')
-rw-r--r--gdb/c-exp.y34
1 files changed, 17 insertions, 17 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index b3bf309..4026d04 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1568,71 +1568,71 @@ _initialize_c_exp ()
{
builtin_type_void =
init_type (TYPE_CODE_VOID, 1,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"void", (struct objfile *) NULL);
builtin_type_char =
init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"char", (struct objfile *) NULL);
builtin_type_signed_char =
init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_SIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_SIGNED,
"signed char", (struct objfile *) NULL);
builtin_type_unsigned_char =
init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_UNSIGNED,
"unsigned char", (struct objfile *) NULL);
builtin_type_short =
init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"short", (struct objfile *) NULL);
builtin_type_unsigned_short =
init_type (TYPE_CODE_INT, TARGET_SHORT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_UNSIGNED,
"unsigned short", (struct objfile *) NULL);
builtin_type_int =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"int", (struct objfile *) NULL);
builtin_type_unsigned_int =
init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_UNSIGNED,
"unsigned int", (struct objfile *) NULL);
builtin_type_long =
init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"long", (struct objfile *) NULL);
builtin_type_unsigned_long =
init_type (TYPE_CODE_INT, TARGET_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_UNSIGNED,
"unsigned long", (struct objfile *) NULL);
builtin_type_long_long =
init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"long long", (struct objfile *) NULL);
builtin_type_unsigned_long_long =
init_type (TYPE_CODE_INT, TARGET_LONG_LONG_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
+ TYPE_FLAG_FUND_TYPE | TYPE_FLAG_UNSIGNED,
"unsigned long long", (struct objfile *) NULL);
builtin_type_float =
init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"float", (struct objfile *) NULL);
builtin_type_double =
init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"double", (struct objfile *) NULL);
builtin_type_long_double =
init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"long double", (struct objfile *) NULL);
builtin_type_complex =
init_type (TYPE_CODE_FLT, TARGET_COMPLEX_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"complex", (struct objfile *) NULL);
builtin_type_double_complex =
init_type (TYPE_CODE_FLT, TARGET_DOUBLE_COMPLEX_BIT / TARGET_CHAR_BIT,
- 0,
+ TYPE_FLAG_FUND_TYPE,
"double complex", (struct objfile *) NULL);
add_language (&c_language_defn);