diff options
author | Jim Blandy <jimb@codesourcery.com> | 2000-11-10 23:18:16 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2000-11-10 23:18:16 +0000 |
commit | 1300f5dda8b5e782749f40dda5ee613eb65273f8 (patch) | |
tree | 159569350d60ccbfc921aede0fc204fb91570776 /gdb | |
parent | 506419459ac4303cdb9adb6e4b121049ef6be0a2 (diff) | |
download | gdb-1300f5dda8b5e782749f40dda5ee613eb65273f8.zip gdb-1300f5dda8b5e782749f40dda5ee613eb65273f8.tar.gz gdb-1300f5dda8b5e782749f40dda5ee613eb65273f8.tar.bz2 |
* stabsread.c (read_range_type): Properly construct complex
type nodes.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/stabsread.c | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index af16bc4..a1838ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2000-11-10 Jim Blandy <jimb@redhat.com> + + * stabsread.c (read_range_type): Properly construct complex + type nodes. + 2000-11-10 Fernando Nasser <fnasser@totem.toronto.redhat.com> * symtab.c (decode_line_1, total_number_of_methods, find_methods, diff --git a/gdb/stabsread.c b/gdb/stabsread.c index fb1a184..730df9d 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -4593,14 +4593,18 @@ read_range_type (char **pp, int typenums[2], struct objfile *objfile) if (n3 == 0 && n2 > 0) { + struct type *float_type + = init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile); + if (self_subrange) { - return init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile); + struct type *complex_type = + init_type (TYPE_CODE_COMPLEX, 2 * n2, 0, NULL, objfile); + TYPE_TARGET_TYPE (complex_type) = float_type; + return complex_type; } else - { - return init_type (TYPE_CODE_FLT, n2, 0, NULL, objfile); - } + return float_type; } /* If the upper bound is -1, it must really be an unsigned int. */ |