Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Philippe De Muyter" <phdm@macqel.be>
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	[thread overview]
Message-ID: <199802100542.GAA26562@mail.macqel.be> (raw)
In-Reply-To: <19980206204523.51968@cygnus.com>

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;
 }


  parent reply	other threads:[~1998-02-09 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19980206204523.51968@cygnus.com>
1998-02-09 21:38 ` For gdb-4.17 : COFF and C++ Philippe De Muyter
1998-02-09 21:43 ` Philippe De Muyter [this message]
1998-02-09 21:48 ` For gdb-4.17 : distclean and YYFILES Philippe De Muyter
1998-02-09 23:09   ` Peter.Schauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199802100542.GAA26562@mail.macqel.be \
    --to=phdm@macqel.be \
    --cc=gdb-patches@cygnus.com \
    --cc=jsm@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox