This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
The following patch fixes the unsigned enum bitfield FAIL's in gdb.base/setvar.exp (on m68k-motorola-syv). Mon Feb 9 16:47:11 1998 Philippe De Muyter <phdm@macqel.be> * coffread.c (coff_read_enum_type): Set TYPE_FLAG_UNSIGNED if enum is unsigned. --- ./gdb/coffread.c Mon Feb 9 16:44:48 1998 +++ ./gdb/coffread.c Mon Feb 9 13:01:56 1998 @@ -2090,6 +2093,7 @@ coff_read_enum_type (index, length, last int o_nsyms; register int n; char *name; + int unsigned_enum = 1; type = coff_alloc_type (index); if (within_function) @@ -2163,11 +2167,16 @@ coff_read_enum_type (index, length, last SYMBOL_TYPE (xsym) = type; TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym); TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym); + if (SYMBOL_VALUE (xsym) < 0) + unsigned_enum = 0; TYPE_FIELD_BITSIZE (type, n) = 0; } if (syms == osyms) break; } + + if (unsigned_enum) + TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED; return type; }