2002-11-11 Andrew Cagney <ac131313@redhat.com>
[deliverable/binutils-gdb.git] / gdb / p-lang.c
index 4796da5f17b67c851707dd49901b651f7bc3bc7b..88c8cc09a907207c1de3a251f09d46892d552338 100644 (file)
@@ -20,6 +20,7 @@
 /* This file is derived from c-lang.c */
 
 #include "defs.h"
+#include "gdb_string.h"
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
@@ -58,7 +59,7 @@ is_pascal_string_type (struct type *type,int *length_pos,
           if (length_pos)
            *length_pos = TYPE_FIELD_BITPOS (type, 0) / TARGET_CHAR_BIT;
           if (length_size)
-           *length_size = TYPE_FIELD_TYPE (type, 0)->length;
+           *length_size = TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0));
           if (string_pos)
            *string_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
           if (char_size)
@@ -76,7 +77,7 @@ is_pascal_string_type (struct type *type,int *length_pos,
           if (length_pos)
            *length_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
           if (length_size)
-           *length_size = TYPE_FIELD_TYPE (type, 1)->length;
+           *length_size = TYPE_LENGTH (TYPE_FIELD_TYPE (type, 1));
           if (string_pos)
            *string_pos = TYPE_FIELD_BITPOS (type, 2) / TARGET_CHAR_BIT;
           /* FIXME: how can I detect wide chars in GPC ?? */
This page took 0.024418 seconds and 4 git commands to generate.