Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Make SSE registers unconditionally available on cygwin
Date: Sat, 13 Sep 2003 17:02:00 -0000	[thread overview]
Message-ID: <20030913170254.GA21503@redhat.com> (raw)
In-Reply-To: <20030913022759.GA2225@redhat.com>

I've made the below change sort of at the request of Mark Kettenis but
it also occurred to me that trying to accommodate older versions of
w32api headers which did not define extended registers was pointless
since gdb crashes in some situations if the registers aren't available.

Rather than investigate what needs to be done to accommodate ancient
versions of cygwin, I opted to just produce a compile error for the
situation where extended registers are not available.  Updating header
files shouldn't be that onerous a task if this problem hits someone.

cgf

2003-09-13  Christopher Faylor  <cgf@redhat.com>

	* win32-nat.c: Just rely on CONTEXT_EXTENDED_REGISTER being defined for
	SSE registers since gdb will not operate correctly without this.
	Restore include file ordering munged in previous change.
	* config/i386/tm-cygwin.h: Remove HAVE_SSE_REGS define.

Index: win32-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/win32-nat.c,v
retrieving revision 1.78
diff -u -p -r1.78 win32-nat.c
--- win32-nat.c	13 Sep 2003 02:26:42 -0000	1.78
+++ win32-nat.c	13 Sep 2003 16:05:24 -0000
@@ -26,15 +26,7 @@
 
 /* We assume we're being built with and will be used for cygwin.  */
 
-#include <windows.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <imagehlp.h>
-#include <sys/cygwin.h>
 #include "defs.h"
-#include "tm.h"			/* required for SSE registers */
 #include "frame.h"		/* required by inferior.h */
 #include "inferior.h"
 #include "target.h"
@@ -44,6 +36,13 @@
 #include "regcache.h"
 #include "top.h"
 #include "i386-tdep.h"
+#include <signal.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <imagehlp.h>
+#include <sys/cygwin.h>
 
 #include "buildsym.h"
 #include "symfile.h"
@@ -70,12 +69,8 @@ enum
 #include <sys/procfs.h>
 #include <psapi.h>
 
-#ifdef HAVE_SSE_REGS
 #define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_DEBUG_REGISTERS \
 	| CONTEXT_EXTENDED_REGISTERS
-#else
-#define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_DEBUG_REGISTERS
-#endif
 
 static unsigned dr[8];
 static int debug_registers_changed = 0;
Index: config/i386/tm-cygwin.h
===================================================================
RCS file: /cvs/uberbaum/gdb/config/i386/tm-cygwin.h,v
retrieving revision 1.15
diff -u -p -r1.15 tm-cygwin.h
--- config/i386/tm-cygwin.h	13 Sep 2003 02:26:42 -0000	1.15
+++ config/i386/tm-cygwin.h	13 Sep 2003 16:05:24 -0000
@@ -19,13 +19,6 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-/* Use SSE registers if winnt.h contains information about them.  */
-#ifdef CONTEXT_EXTENDED_REGISTERS
-#define HAVE_SSE_REGS
-#else
-#undef HAVE_SSE_REGS
-#endif /* CONTEXT_EXTENDED_REGISTERS */
-
 #include "i386/tm-i386.h"
 
 #define ATTACH_NO_WAIT


      parent reply	other threads:[~2003-09-13 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-13  2:28 [PATCH] Properly define SSE registers for cygwin targets Christopher Faylor
2003-09-13 11:03 ` Mark Kettenis
2003-09-13 15:52   ` Christopher Faylor
2003-09-13 16:04     ` Christopher Faylor
2003-09-14 15:46     ` Mark Kettenis
2003-09-14 17:35       ` Christopher Faylor
2003-09-13 17:02 ` Christopher Faylor [this message]

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=20030913170254.GA21503@redhat.com \
    --to=cgf@redhat.com \
    --cc=gdb-patches@sources.redhat.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