aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/coffread.c15
2 files changed, 12 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ee80854..0c657ba 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -7,6 +7,11 @@ Mon Feb 17 07:13:27 1992 Fred Fish (fnf at cygnus.com)
When creating a new user defined type, check to see if a partial
type already exists, and if so, bash it to fit.
+Fri Feb 14 19:00:17 1992 John Gilmore (gnu at cygnus.com)
+
+ * coffread.c (decode_base_type): Pass long, not union.
+ Fix by Eric Valette, ev@chorus.fr.
+
Thu Feb 13 17:14:28 1992 Fred Fish (fnf at cygnus.com)
* elfread.c (elf_symtab_read): Fix code to correctly track
diff --git a/gdb/coffread.c b/gdb/coffread.c
index bd5b0ce..13c3f2d 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -1795,7 +1795,7 @@ decode_base_type (cs, c_type, aux)
type = coff_alloc_type (cs->c_symnum);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
TYPE_NAME (type) = concat ("struct ", "<opaque>", NULL);
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = 0;
TYPE_FIELDS (type) = 0;
TYPE_NFIELDS (type) = 0;
@@ -1804,7 +1804,7 @@ decode_base_type (cs, c_type, aux)
{
type = read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
}
return type;
@@ -1814,7 +1814,7 @@ decode_base_type (cs, c_type, aux)
/* anonymous union type */
type = coff_alloc_type (cs->c_symnum);
TYPE_NAME (type) = concat ("union ", "<opaque>", NULL);
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = 0;
TYPE_LENGTH (type) = 0;
TYPE_FIELDS (type) = 0;
@@ -1824,7 +1824,7 @@ decode_base_type (cs, c_type, aux)
{
type = read_struct_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
}
TYPE_CODE (type) = TYPE_CODE_UNION;
return type;
@@ -1832,7 +1832,7 @@ decode_base_type (cs, c_type, aux)
case T_ENUM:
return read_enum_type (cs->c_symnum,
aux->x_sym.x_misc.x_lnsz.x_size,
- aux->x_sym.x_fcnary.x_fcn.x_endndx);
+ aux->x_sym.x_fcnary.x_fcn.x_endndx.l);
case T_MOE:
/* shouldn't show up here */
@@ -1890,7 +1890,7 @@ read_struct_type (index, length, lastsym)
type = coff_alloc_type (index);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
- TYPE_CPLUS_SPECIFIC(type) = &cplus_struct_default;
+ INIT_CPLUS_SPECIFIC(type);
TYPE_LENGTH (type) = length;
while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
@@ -2019,8 +2019,7 @@ read_enum_type (index, length, lastsym)
/* Now fill in the fields of the type-structure. */
- /* FIXME: Should be sizeof (int) on target, not host. */
- TYPE_LENGTH (type) = sizeof (int);
+ TYPE_LENGTH (type) = TARGET_INT_BIT / TARGET_CHAR_BIT;
TYPE_CODE (type) = TYPE_CODE_ENUM;
TYPE_NFIELDS (type) = nsyms;
TYPE_FIELDS (type) = (struct field *)