From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26609 invoked by alias); 7 Jan 2009 11:35:08 -0000 Received: (qmail 26599 invoked by uid 22791); 7 Jan 2009 11:35:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Jan 2009 11:35:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AC2122A95FB for ; Wed, 7 Jan 2009 06:34:59 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id g8HcSqYdvEkh for ; Wed, 7 Jan 2009 06:34:59 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 349902A964B for ; Wed, 7 Jan 2009 06:34:59 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 107AEE7ACD; Wed, 7 Jan 2009 15:34:52 +0400 (RET) Date: Wed, 07 Jan 2009 11:35:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/win32] CONTEXT_EXTENDED_REGISTERS is not defined on x86_64-windows Message-ID: <20090107113451.GE18595@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-01/txt/msg00083.txt.bz2 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 674 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 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not already defined. Tested on x86-windows. OK to apply? Thanks, -- Joel --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="macro.diff" Content-length: 496 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 +#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 --rJwd6BRFiFCcLxzm--