aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.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/dwarf2read.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/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e006681..e5450d0 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2979,6 +2979,18 @@ read_base_type (struct die_info *die, struct objfile *objfile)
type = init_type (code, size, type_flags, DW_STRING (attr), objfile);
if (encoding == DW_ATE_address)
TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID);
+ else if (encoding == DW_ATE_complex_float)
+ {
+ if (size == 32)
+ TYPE_TARGET_TYPE (type)
+ = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT);
+ else if (size == 16)
+ TYPE_TARGET_TYPE (type)
+ = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT);
+ else if (size == 8)
+ TYPE_TARGET_TYPE (type)
+ = dwarf2_fundamental_type (objfile, FT_FLOAT);
+ }
}
else
{