[pushed] Fix x86_64 mingw build

Message ID 20210503184154.4005092-1-tromey@adacore.com
State New
Headers show
Series
  • [pushed] Fix x86_64 mingw build
Related show

Commit Message

Tom Tromey May 3, 2021, 6:41 p.m.
PR build/27807 points out that my recent changes to the Windows port
missed a spot in win32-i386-low.cc -- a call to
win32_Wow64GetThreadContext remained, causing link errors in
gdbserver.  This happened because I tested an i686 build, but this
code is only used on an x86_64 build.

This patch fixes the bug.  I am checking it in.

gdbserver/ChangeLog
2021-05-03  Tom Tromey  <tromey@adacore.com>

	PR build/27807:
	* win32-i386-low.cc (i386_get_thread_context): Call
	Wow64GetThreadContext, not win32_Wow64GetThreadContext.
---
 gdbserver/ChangeLog         | 6 ++++++
 gdbserver/win32-i386-low.cc | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

-- 
2.26.3

Patch

diff --git a/gdbserver/win32-i386-low.cc b/gdbserver/win32-i386-low.cc
index 5fc4be0d4c7..e2afd2a8c17 100644
--- a/gdbserver/win32-i386-low.cc
+++ b/gdbserver/win32-i386-low.cc
@@ -260,7 +260,7 @@  i386_get_thread_context (windows_thread_info *th)
   BOOL ret;
 #ifdef __x86_64__
   if (wow64_process)
-    ret = win32_Wow64GetThreadContext (th->h, &th->wow64_context);
+    ret = Wow64GetThreadContext (th->h, &th->wow64_context);
   else
 #endif
     ret = GetThreadContext (th->h, &th->context);