RE: [RFA] [2/4] Mingw64 gdbserver support

Pierre Muller
2010-04-20T06:10:05Z

It appears that I missed two issues raised by
Pedro in my commit of part 2.
This patch resolves those.

With my apologies,

Pierre

2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>

* win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
be consistent with other sources of this directory.
(init_registers_amd64): Correct name of source file of this function
in the comment.

Index: win32-i386-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/win32-i386-low.c,v
retrieving revision 1.19
diff -u -p -r1.19 win32-i386-low.c
--- win32-i386-low.c 20 Apr 2010 00:17:05 -0000 1.19
+++ win32-i386-low.c 20 Apr 2010 06:03:48 -0000
@@ -28,8 +28,8 @@

#define FLAG_TRACE_BIT 0x100

-#ifdef __x86_64
-/* Defined in auto-generated file reg-i386.c. */
+#ifdef __x86_64__
+/* Defined in auto-generated file reg-amd64.c. */
void init_registers_amd64 (void);
#else
/* Defined in auto-generated file reg-i386.c. */
@@ -223,7 +223,7 @@ i386_single_step (win32_thread_info *th)
th->context.EFlags |= FLAG_TRACE_BIT;
}

-#ifndef __x86_64
+#ifndef __x86_64__

/* An array of offset mappings into a Win32 Context structure.
This is a one-to-one mapping which is indexed by gdb's register
@@ -280,7 +280,7 @@ static const int mappings[] = {
};
#undef context_offset

-#else /* __x86_64 */
+#else /* __x86_64__ */

#define context_offset(x) (offsetof (CONTEXT, x))
static const int mappings[] =
@@ -347,7 +347,7 @@ static const int mappings[] =
};
#undef context_offset

-#endif /* __x86_64 */
+#endif /* __x86_64__ */

/* Fetch register from gdbserver regcache data. */
static void
@@ -386,7 +386,7 @@ static const unsigned char i386_win32_br
static void
init_windows_x86 (void)
{
-#ifdef __x86_64
+#ifdef __x86_64__
init_registers_amd64 ();
#else
init_registers_i386 ();