This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] SSE registers for cygxin target.

   The patch below adds SSE registers for cygwin target.

The only missing code is an addendum to
in order to check if CONTEXT_EXTENDED_REGISTERS 
is known in winnt.h header file.
I asked about this in
but got no answers...

   But I never wrote any of these rules, and I even don't know how to regenerate
configure from file ...

   For now, to test the patch, you will need to do
a 'make clean' followed by a 'make "CFLAGS=-dHAVE_CONTEXT_EXTENDED_REGISTERS -gstabs+ -O1"'
for instance.

PS: I disabled flowed mode from my Eudora settings and hope that this will
fix the problems existing in the latest patches I sent. Please ask me to send it again attached if 
this patch does not aply cleanly.

PS2: Once this patch is in, I will send the next, i.e.
the support of debug registers... DJ Delorie's idea was
correct, this works like a charm (at least for me
on a Win2000 box).

ChangeLog entry:
2001-11-26 Pierre Muller  <>

	* config/i386/tm-cygwin.h: Define HAVE_SSE_REGS
	* win32-nat.c: Define CONTEXT_DEBUGGER_DR that will also
	include extended registers if HAVE_SSE_REGS is defined.
	(mappings array): Add offset of extended registers.
	(thread_rec): Use new CONTEXT_DEBUGGER_DR macro.

Index: config/i386/tm-cygwin.h
RCS file: /cvs/src/src/gdb/config/i386/tm-cygwin.h,v
retrieving revision 1.10
diff -u -r1.10 tm-cygwin.h
--- tm-cygwin.h	2001/11/01 16:17:08	1.10
+++ tm-cygwin.h	2001/11/26 09:47:09
@@ -19,8 +19,12 @@
     Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.  */
-#undef HAVE_SSE_REGS	/* FIXME! win32-nat.c needs to support XMMi registers */
+/* Use SSE registers if winnt.h contains information about them.  */
+#define HAVE_SSE_REGS
  #define HAVE_I387_REGS
  #include "i386/tm-i386.h"
Index: win32-nat.c
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.38
diff -u -r1.38 win32-nat.c
--- win32-nat.c	2001/11/24 19:00:03	1.38
+++ win32-nat.c	2001/11/26 09:47:09
@@ -25,6 +25,7 @@
  /* We assume we're being built with and will be used for cygwin.  */
  #include "defs.h"
+#include "tm.h"			/* required for SSE registers */
  #include "frame.h"		/* required by inferior.h */
  #include "inferior.h"
  #include "target.h"
@@ -66,6 +67,13 @@
  #include <sys/procfs.h>
  #include <psapi.h>
  /* The string sent by cygwin when it processes a signal.
     FIXME: This should be in a cygwin include file. */
  #define CYGWIN_SIGNAL_STRING "cygwin: signal"
@@ -169,6 +177,19 @@
    context_offset (FloatSave.DataSelector),
    context_offset (FloatSave.DataOffset),
    context_offset (FloatSave.ErrorSelector)
+  /* XMM0-7 */ ,
+  context_offset (ExtendedRegisters[0*16]),
+  context_offset (ExtendedRegisters[1*16]),
+  context_offset (ExtendedRegisters[2*16]),
+  context_offset (ExtendedRegisters[3*16]),
+  context_offset (ExtendedRegisters[4*16]),
+  context_offset (ExtendedRegisters[5*16]),
+  context_offset (ExtendedRegisters[6*16]),
+  context_offset (ExtendedRegisters[7*16]),
+  /* MXCSR untested */
+  context_offset (ExtendedRegisters[8*16])
  #undef context_offset
@@ -210,7 +231,7 @@
  	    else if (get_context < 0)
  	      th->suspend_count = -1;
-	    th->context.ContextFlags = CONTEXT_DEBUGGER;
+	    th->context.ContextFlags = CONTEXT_DEBUGGER_DR;
  	    GetThreadContext (th->h, &th->context);
  	return th;

Pierre Muller
Institut Charles Sadron
6,rue Boussingault
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]