Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/win32] CONTEXT_EXTENDED_REGISTERS is not defined on x86_64-windows
Date: Wed, 07 Jan 2009 11:35:00 -0000	[thread overview]
Message-ID: <20090107113451.GE18595@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hello,

win32-nat.c uses CONTEXT_EXTENDED_REGISTERS in the following macro
declaration:

 #define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_DEBUG_REGISTERS \
        | CONTEXT_EXTENDED_REGISTERS

However, CONTEXT_EXTENDED_REGISTERS is not defined on x86_64-windows.
It seems to me that this macro only makes sense on i386, so I simply
defined it to 0 if not already defined. This should have no effect
on x86-windows while doing the right thing on x86_64-windows.

2009-01-07  Joel Brobecker  <brobecker@adacore.com>

        * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
        already defined.

Tested on x86-windows.
OK to apply?

Thanks,
-- 
Joel

[-- Attachment #2: macro.diff --]
[-- Type: text/plain, Size: 496 bytes --]

diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index 51443a3..1b15dfb 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -85,6 +85,12 @@ enum
 #endif
 #include <psapi.h>
 
+#ifndef CONTEXT_EXTENDED_REGISTERS
+/* This macro is only defined on ia32.  It only makes sense on this target,
+   so define it as zero if not already defined.  */
+#define CONTEXT_EXTENDED_REGISTERS 0
+#endif
+
 #define CONTEXT_DEBUGGER_DR CONTEXT_DEBUGGER | CONTEXT_DEBUG_REGISTERS \
 	| CONTEXT_EXTENDED_REGISTERS
 

             reply	other threads:[~2009-01-07 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 11:35 Joel Brobecker [this message]
2009-01-07 17:01 ` Christopher Faylor
2009-01-09 10:46   ` Joel Brobecker

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=20090107113451.GE18595@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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