aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-03-21 00:53:44 +0000
committerDaniel Jacobowitz <drow@false.org>2002-03-21 00:53:44 +0000
commitf65ca430eb1613be683a3e6dbcad7a449c80b85c (patch)
treef4d0e0193971486f2d513f7d04b93c4dc3cc2720 /gdb/c-lang.c
parentae5742ba512254333f91dc31fbc3406b0c94b324 (diff)
downloadgdb-f65ca430eb1613be683a3e6dbcad7a449c80b85c.zip
gdb-f65ca430eb1613be683a3e6dbcad7a449c80b85c.tar.gz
gdb-f65ca430eb1613be683a3e6dbcad7a449c80b85c.tar.bz2
2002-03-20 Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/422. * c-lang.c (c_create_fundamental_type): Handle FT_COMPLEX, FT_DBL_PREC_COMPLEX, and FT_EXT_PREC_COMPLEX. * dwarf2read.c (read_base_type): Set TYPE_TARGET_TYPE for complex types. * stabsread.c (rs6000_builtin_type): Likewise. (read_sun_floating_type): Likewise.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index fa977cd..f98548a 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -338,6 +338,30 @@ c_create_fundamental_type (struct objfile *objfile, int typeid)
TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
0, "long double", objfile);
break;
+ case FT_COMPLEX:
+ type = init_type (TYPE_CODE_FLT,
+ 2 * TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
+ 0, "complex float", objfile);
+ TYPE_TARGET_TYPE (type)
+ = init_type (TYPE_CODE_FLT, TARGET_FLOAT_BIT / TARGET_CHAR_BIT,
+ 0, "float", objfile);
+ break;
+ case FT_DBL_PREC_COMPLEX:
+ type = init_type (TYPE_CODE_FLT,
+ 2 * TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "complex double", objfile);
+ TYPE_TARGET_TYPE (type)
+ = init_type (TYPE_CODE_FLT, TARGET_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "double", objfile);
+ break;
+ case FT_EXT_PREC_COMPLEX:
+ type = init_type (TYPE_CODE_FLT,
+ 2 * TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "complex long double", objfile);
+ TYPE_TARGET_TYPE (type)
+ = init_type (TYPE_CODE_FLT, TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT,
+ 0, "long double", objfile);
+ break;
case FT_TEMPLATE_ARG:
type = init_type (TYPE_CODE_TEMPLATE_ARG,
0,