From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Cc: Christopher Faylor <cgf@redhat.com>
Subject: Re: [RFA] SSE registers for cygxin target.
Date: Sun, 11 Nov 2001 11:08:00 -0000 [thread overview]
Message-ID: <4.2.0.58.20011126110847.01cb6c20@ics.u-strasbg.fr> (raw)
Message-ID: <20011111110800.mXgODsPDadUtK9IpoLQWpgNc-iIdz7kT-bmVMyr8T5o@z> (raw)
In-Reply-To: <4.2.0.58.20011126104808.00acab48@ics.u-strasbg.fr>
[-- Attachment #1: Type: text/plain, Size: 4481 bytes --]
Apparently, my Eudora change is not enough to get the patch to be correct,
so I add it attached.
> The patch below adds SSE registers for cygwin target.
>
>The only missing code is an addendum to configure.in
>in order to check if CONTEXT_EXTENDED_REGISTERS
>is known in winnt.h header file.
>I asked about this in
>http://sources.redhat.com/ml/gdb/2001-11/msg00219.html
>but got no answers...
>
> But I never wrote any of these rules, and I even don't know how to regenerate
>configure from configure.in 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 <muller@ics.u-strasbg.fr>
>
> * config/i386/tm-cygwin.h: Define HAVE_SSE_REGS
> if HAVE_CONTEXT_EXTENDED_REGISTERS is defined.
> * 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. */
>+#ifdef HAVE_CONTEXT_EXTENDED_REGISTERS
>+#define HAVE_SSE_REGS
>+#else
>+#undef HAVE_SSE_REGS
>+#endif /* CONTEXT_EXTENDED_REGISTERS */
> #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>
>
>+#ifdef HAVE_SSE_REGS
>+#define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_EXTENDED_REGISTERS
>+#else
>+#define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER
>+#endif
>+
>+
> /* 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)
>+#ifdef HAVE_SSE_REGS
>+ /* 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])
>+#endif
> };
>
> #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
>F 67083 STRASBOURG CEDEX (France)
>mailto:muller@ics.u-strasbg.fr
>Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
[-- Attachment #2: win32.diffs --]
[-- Type: text/plain, Size: 2543 bytes --]
Index: win32-nat.c\0===================================================================\0RCS file: /cvs/src/src/gdb/win32-nat.c,v\0retrieving revision 1.38\0diff -u -r1.38 win32-nat.c\0--- win32-nat.c 2001/11/24 19:00:03 1.38\0+++ win32-nat.c 2001/11/26 09:47:09\0@@ -25,6 +25,7 @@\0 /* We assume we're being built with and will be used for cygwin. */\0 \0 #include "defs.h"\0+#include "tm.h" /* required for SSE registers */\0 #include "frame.h" /* required by inferior.h */\0 #include "inferior.h"\0 #include "target.h"\0@@ -66,6 +67,13 @@\0 #include <sys/procfs.h>\0 #include <psapi.h>\0 \0+#ifdef HAVE_SSE_REGS\0+#define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_EXTENDED_REGISTERS \0+#else\0+#define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER\0+#endif\0+\0+\0 /* The string sent by cygwin when it processes a signal.\0 FIXME: This should be in a cygwin include file. */\0 #define CYGWIN_SIGNAL_STRING "cygwin: signal"\0@@ -169,6 +177,19 @@\0 context_offset (FloatSave.DataSelector),\0 context_offset (FloatS!
ave.DataOffset),\0 context_offset (FloatSave.ErrorSelector)\0+#ifdef HAVE_SSE_REGS\0+ /* XMM0-7 */ ,\0+ context_offset (ExtendedRegisters[0*16]),\0+ context_offset (ExtendedRegisters[1*16]),\0+ context_offset (ExtendedRegisters[2*16]),\0+ context_offset (ExtendedRegisters[3*16]),\0+ context_offset (ExtendedRegisters[4*16]),\0+ context_offset (ExtendedRegisters[5*16]),\0+ context_offset (ExtendedRegisters[6*16]),\0+ context_offset (ExtendedRegisters[7*16]),\0+ /* MXCSR untested */\0+ context_offset (ExtendedRegisters[8*16])\0+#endif\0 };\0 \0 #undef context_offset\0@@ -210,7 +231,7 @@\0 else if (get_context < 0)\0 th->suspend_count = -1;\0 \0- th->context.ContextFlags = CONTEXT_DEBUGGER;\0+ th->context.ContextFlags = CONTEXT_DEBUGGER_DR;\0 GetThreadContext (th->h, &th->context);\0 }\0 return th;\0Index: config/i386/tm-cygwin.h\0===================================================================\0RCS file: /cvs/src/src/gdb/config/i386/tm-cygwin.h,v\0retrieving revisi!
on 1.10\0diff -u -r1.10 tm-cygwin.h\0--- tm-cygwin.h 2001/11/01 16:17:08 1.10\0+++ tm-cygwin.h 2001/11/26 09:47:09\0@@ -19,8 +19,12 @@\0 Foundation, Inc., 59 Temple Place - Suite 330,\0 Boston, MA 02111-1307, USA. */\0 \0-\0-#undef HAVE_SSE_REGS /* FIXME! win32-nat.c needs to support XMMi registers */\0+/* Use SSE registers if winnt.h contains information about them. */\0+#ifdef HAVE_CONTEXT_EXTENDED_REGISTERS\0+#define HAVE_SSE_REGS\0+#else\0+#undef HAVE_SSE_REGS\0+#endif /* CONTEXT_EXTENDED_REGISTERS */\0 #define HAVE_I387_REGS\0 \0 #include "i386/tm-i386.h"\0
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
next prev parent reply other threads:[~2001-11-26 10:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-26 2:06 Pierre Muller
2001-11-11 11:03 ` Pierre Muller
2001-11-12 8:54 ` Eli Zaretskii
2001-11-13 7:48 ` Andrew Cagney
2001-11-26 12:43 ` Andrew Cagney
2001-11-26 14:23 ` Christopher Faylor
2001-11-13 8:51 ` Christopher Faylor
2001-11-13 19:54 ` Andrew Cagney
2001-11-13 22:27 ` Christopher Faylor
2001-11-26 21:17 ` Christopher Faylor
2001-11-26 20:47 ` Andrew Cagney
2001-11-26 4:58 ` Pierre Muller
2001-11-12 9:40 ` Pierre Muller
2001-11-26 2:10 ` Pierre Muller [this message]
2001-11-11 11:08 ` Pierre Muller
2001-11-11 12:11 ` Corinna Vinschen
2001-11-26 3:44 ` Pierre Muller
2001-11-11 13:37 ` Pierre Muller
2001-11-12 11:29 ` Christopher Faylor
2001-11-12 14:28 ` muller
2001-11-26 10:43 ` muller
2001-11-26 9:40 ` Christopher Faylor
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=4.2.0.58.20011126110847.01cb6c20@ics.u-strasbg.fr \
--to=muller@cerbere.u-strasbg.fr \
--cc=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