* [PATCH] Properly define SSE registers for cygwin targets
@ 2003-09-13 2:28 Christopher Faylor
2003-09-13 11:03 ` Mark Kettenis
2003-09-13 17:02 ` [PATCH] Make SSE registers unconditionally available on cygwin Christopher Faylor
0 siblings, 2 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-09-13 2:28 UTC (permalink / raw)
To: gdb-patches
Checked in, trunk and branch.
cgf
2003-09-12 Christopher Faylor <cgf@redhat.com>
* win32-nat.c: Reorganize so that defines used by target headers are
actually defined by the system headers.
* config/i386/tm-cygwin.h: Check for CONTEXT_EXTENDED_REGISTERS rather
than HAVE_CONTEXT_EXTENDED_REGISTERS, since the latter actually exists.
Index: win32-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/win32-nat.c,v
retrieving revision 1.77
diff -u -p -r1.77 win32-nat.c
--- win32-nat.c 6 Jul 2003 19:48:54 -0000 1.77
+++ win32-nat.c 13 Sep 2003 02:25:16 -0000
@@ -26,6 +26,13 @@
/* 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 */
@@ -37,13 +44,6 @@
#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"
Index: config/i386/tm-cygwin.h
===================================================================
RCS file: /cvs/uberbaum/gdb/config/i386/tm-cygwin.h,v
retrieving revision 1.14
diff -u -p -r1.14 tm-cygwin.h
--- config/i386/tm-cygwin.h 22 Nov 2002 07:34:55 -0000 1.14
+++ config/i386/tm-cygwin.h 13 Sep 2003 02:25:16 -0000
@@ -20,7 +20,7 @@
Boston, MA 02111-1307, USA. */
/* Use SSE registers if winnt.h contains information about them. */
-#ifdef HAVE_CONTEXT_EXTENDED_REGISTERS
+#ifdef CONTEXT_EXTENDED_REGISTERS
#define HAVE_SSE_REGS
#else
#undef HAVE_SSE_REGS
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] Properly define SSE registers for cygwin targets
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 17:02 ` [PATCH] Make SSE registers unconditionally available on cygwin Christopher Faylor
1 sibling, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2003-09-13 11:03 UTC (permalink / raw)
To: cgf; +Cc: gdb-patches
Date: Fri, 12 Sep 2003 22:27:59 -0400
From: Christopher Faylor <cgf@redhat.com>
Checked in, trunk and branch.
cgf
2003-09-12 Christopher Faylor <cgf@redhat.com>
* win32-nat.c: Reorganize so that defines used by target headers are
actually defined by the system headers.
* config/i386/tm-cygwin.h: Check for CONTEXT_EXTENDED_REGISTERS rather
than HAVE_CONTEXT_EXTENDED_REGISTERS, since the latter actually exists.
Hmm, this looks like a lost opportunity to get rid of a definition in
tm-cygwin.h. HAVE_SSE_REGS has been eliminated from all source files
except win32-nat.c. So a s/HAVE_SSE_REGS/CONTEXT_EXTENDED_REGISTERS/g
in that file would have been sufficient. This also removes the need
to re-order the includes; out coding standards say that "defs.h"
should always come first. Oh and the #include "tm.h" is bogus, since
"defs.h" already does that.
It would be great if you could clean up things along those lines. The
"tm-cygwin.h" still contains a lot of stuff that doesn't belong there.
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Properly define SSE registers for cygwin targets
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
0 siblings, 2 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-09-13 15:52 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On Sat, Sep 13, 2003 at 01:02:59PM +0200, Mark Kettenis wrote:
> Date: Fri, 12 Sep 2003 22:27:59 -0400
> From: Christopher Faylor <cgf@redhat.com>
>
> Checked in, trunk and branch.
>
> cgf
>
> 2003-09-12 Christopher Faylor <cgf@redhat.com>
>
> * win32-nat.c: Reorganize so that defines used by target headers are
> actually defined by the system headers.
> * config/i386/tm-cygwin.h: Check for CONTEXT_EXTENDED_REGISTERS rather
> than HAVE_CONTEXT_EXTENDED_REGISTERS, since the latter actually exists.
>
>Hmm, this looks like a lost opportunity to get rid of a definition in
>tm-cygwin.h. HAVE_SSE_REGS has been eliminated from all source files
>except win32-nat.c. So a s/HAVE_SSE_REGS/CONTEXT_EXTENDED_REGISTERS/g
>in that file would have been sufficient. This also removes the need
>to re-order the includes; out coding standards say that "defs.h"
>should always come first.
Where do you think CONTEXT_EXTENDED_REGISTERS comes from?
Another question: If HAVE_SSE_REGS was eliminated from all source files
why wasn't it eliminated from win32-nat.c? Did I miss a memo?
cgf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Properly define SSE registers for cygwin targets
2003-09-13 15:52 ` Christopher Faylor
@ 2003-09-13 16:04 ` Christopher Faylor
2003-09-14 15:46 ` Mark Kettenis
1 sibling, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-09-13 16:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Mark Kettenis
On Sat, Sep 13, 2003 at 11:51:57AM -0400, Christopher Faylor wrote:
>Where do you think CONTEXT_EXTENDED_REGISTERS comes from?
Nevermind. Stupid question. Still waking up.
cgf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Properly define SSE registers for cygwin targets
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
1 sibling, 1 reply; 7+ messages in thread
From: Mark Kettenis @ 2003-09-14 15:46 UTC (permalink / raw)
To: cgf; +Cc: gdb-patches
Date: Sat, 13 Sep 2003 11:51:57 -0400
From: Christopher Faylor <cgf@redhat.com>
Another question: If HAVE_SSE_REGS was eliminated from all source files
why wasn't it eliminated from win32-nat.c? Did I miss a memo?
Well, I'm pretty sure I've burried a comment about Cygwin still using
HAVE_SSE_REGS somewhere in a comment of one of the zillion
i386-specific patches over the last year. Do you want me to drop you
a note if something Cygwin-specific comes up?
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Properly define SSE registers for cygwin targets
2003-09-14 15:46 ` Mark Kettenis
@ 2003-09-14 17:35 ` Christopher Faylor
0 siblings, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-09-14 17:35 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
On Sun, Sep 14, 2003 at 05:46:45PM +0200, Mark Kettenis wrote:
> Date: Sat, 13 Sep 2003 11:51:57 -0400
> From: Christopher Faylor <cgf@redhat.com>
>
> Another question: If HAVE_SSE_REGS was eliminated from all source files
> why wasn't it eliminated from win32-nat.c? Did I miss a memo?
>
>Well, I'm pretty sure I've burried a comment about Cygwin still using
>HAVE_SSE_REGS somewhere in a comment of one of the zillion
>i386-specific patches over the last year. Do you want me to drop you
>a note if something Cygwin-specific comes up?
Hmm. I usually scan the gdb-patches and gdb mailing lists for the cygwin
keyword but I probably missed this.
I appreciate the offer but I'll just try to make sure that I do better in
the future. There's no need for you to go to extra effort. Although,
if you notice something that requires an obvious fix in win32-nat.c, or
whatever, then feel free to check it in (maybe you're doing that
already). I'll be on the lookout for that too so that I can test
changes that impact cygwin.
cgf
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Make SSE registers unconditionally available on cygwin
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 17:02 ` Christopher Faylor
1 sibling, 0 replies; 7+ messages in thread
From: Christopher Faylor @ 2003-09-13 17:02 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-09-14 17:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] Make SSE registers unconditionally available on cygwin Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox