summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2002-03-21 00:53:44 +0000
committerDaniel Jacobowitz <dan@debian.org>2002-03-21 00:53:44 +0000
commit586ea7745c318167ab3e914f6a8293f1a13e9b82 (patch)
treea6597eb8f0577d0f08f759e5daa101e99b4f073e /gdb/dwarf2read.c
parent1d628440becd2866c5b0a0e3a5351e689aff330e (diff)
downloadgdb-586ea7745c318167ab3e914f6a8293f1a13e9b82.tar.gz
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 e006681a13a..e5450d06cef 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
{