aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>1998-05-16 20:34:43 +0000
committerFrank Ch. Eigler <fche@redhat.com>1998-05-16 20:34:43 +0000
commitc19916b73ee3c695f168e9ddbe867124d8110caf (patch)
tree3ad95e3c05aae10c3900ed2666c2786d01e9bd4f /gdb/stabsread.c
parent5f4c24c02420ceb55b2b4fa22428bacb0f56e4cc (diff)
downloadgdb-c19916b73ee3c695f168e9ddbe867124d8110caf.zip
gdb-c19916b73ee3c695f168e9ddbe867124d8110caf.tar.gz
gdb-c19916b73ee3c695f168e9ddbe867124d8110caf.tar.bz2
* Bringing over patches for PR 15870, 15653 from chill/d30v branches.
Also, fixed a small third-party sanitize typo in ChangeLog.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 480bb1c..be562e5 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -3433,16 +3433,18 @@ read_one_struct_field (fip, pp, p, type, objfile)
Note that forward refs cannot be packed,
and treat enums as if they had the width of ints. */
- if (TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_INT
- && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_RANGE
- && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_BOOL
- && TYPE_CODE (FIELD_TYPE (fip->list->field)) != TYPE_CODE_ENUM)
+ struct type *field_type = check_typedef (FIELD_TYPE (fip->list->field));
+
+ if (TYPE_CODE (field_type) != TYPE_CODE_INT
+ && TYPE_CODE (field_type) != TYPE_CODE_RANGE
+ && TYPE_CODE (field_type) != TYPE_CODE_BOOL
+ && TYPE_CODE (field_type) != TYPE_CODE_ENUM)
{
FIELD_BITSIZE (fip->list->field) = 0;
}
if ((FIELD_BITSIZE (fip->list->field)
- == TARGET_CHAR_BIT * TYPE_LENGTH (FIELD_TYPE (fip->list->field))
- || (TYPE_CODE (FIELD_TYPE (fip->list->field)) == TYPE_CODE_ENUM
+ == TARGET_CHAR_BIT * TYPE_LENGTH (field_type)
+ || (TYPE_CODE (field_type) == TYPE_CODE_ENUM
&& FIELD_BITSIZE (fip->list->field) == TARGET_INT_BIT )
)
&&