From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Philippe De Muyter" To: jsm@cygnus.com (Jason Molenda) Cc: gdb-patches@cygnus.com Subject: For gdb-4.17 : COFF and unsigned enum's Date: Mon, 09 Feb 1998 21:43:00 -0000 Message-id: <199802100542.GAA26562@mail.macqel.be> References: <19980206204523.51968@cygnus.com> X-SW-Source: 1998/msg00016.html 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 * 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; }