public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
@ 2021-05-01 19:16 markus.boeck02 at gmail dot com
  2021-05-03 14:04 ` [Bug build/27807] " tromey at sourceware dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: markus.boeck02 at gmail dot com @ 2021-05-01 19:16 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

            Bug ID: 27807
           Summary: Link failure on Windows due to undefined reference to
                    win32_Wow64GetThreadContext
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: markus.boeck02 at gmail dot com
  Target Milestone: ---

Current trunk of gdbserver currently fails to link on MinGW targets due to an
undefined reference to `win32_Wow64GetThreadContext`. It seems to me as if this
global variable was removed in de0718729053b7c558166f3cc1a7d170c48a25de
yet a usage remains in gdbserver/win32-i386-low.cc:263.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
@ 2021-05-03 14:04 ` tromey at sourceware dot org
  2021-05-03 14:06 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2021-05-03 14:04 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
  2021-05-03 14:04 ` [Bug build/27807] " tromey at sourceware dot org
@ 2021-05-03 14:06 ` tromey at sourceware dot org
  2021-05-03 16:32 ` markus.boeck02 at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2021-05-03 14:06 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-05-03
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Sorry about that.

I don't seem to know how to arrange for this kind of build.
So, could you try this patch?
If it works for you, I will check it in.

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);

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
  2021-05-03 14:04 ` [Bug build/27807] " tromey at sourceware dot org
  2021-05-03 14:06 ` tromey at sourceware dot org
@ 2021-05-03 16:32 ` markus.boeck02 at gmail dot com
  2021-05-03 18:28 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: markus.boeck02 at gmail dot com @ 2021-05-03 16:32 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

--- Comment #2 from Markus Böck <markus.boeck02 at gmail dot com> ---
For the sake of completion:

This is the output of gdb --configuration, aka roughly the configuration I
used:

configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32                
                                                                               
                                                                               
       --with-auto-load-dir=$debugdir:$datadir/auto-load                       
                                                                               
                                                                               
    --with-auto-load-safe-path=$debugdir:$datadir/auto-load                    
                                                                               
                                                                               
 --with-expat                                                                  
                                                                               
                                                                             
--with-gdb-datadir=/mnt/c/GDB/share/gdb (relocatable)                          
                                                                               
                                                                            
--with-jit-reader-dir=/mnt/c/GDB/lib/gdb (relocatable)                         
                                                                               
                                                                            
--without-libunwind-ia64                                                       
                                                                               
                                                                            
--with-lzma                                                                    
                                                                               
                                                                            
--without-babeltrace                                                           
                                                                               
                                                                            
--without-intel-pt                                                             
                                                                               
                                                                            
--with-mpfr                                                                    
                                                                               
                                                                            
--without-xxhash                                                               
                                                                               
                                                                            
--with-python=/mnt/c/GCC-Build/NewestLinux/Libraries                           
                                                                               
                                                                            
--with-python-libdir=/mnt/c/GCC-Build/NewestLinux/Libraries/lib                
                                                                               
                                                                            
--without-debuginfod                                                           
                                                                               
                                                                            
--without-guile                                                                
                                                                               
                                                                            
--disable-source-highlight                                                     
                                                                               
                                                                            
--with-separate-debug-dir=/mnt/c/GDB/lib/debug (relocatable)                   
                                                                               
                                                                            
--with-system-gdbinit=/mnt/c/GDB/etc/gdbinit.py (relocatable)

I am happy to report however that your proposed patch seems to work and
gdbserver once again succeeds to link. Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
                   ` (2 preceding siblings ...)
  2021-05-03 16:32 ` markus.boeck02 at gmail dot com
@ 2021-05-03 18:28 ` tromey at sourceware dot org
  2021-05-03 18:42 ` cvs-commit at gcc dot gnu.org
  2021-05-03 18:49 ` tromey at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2021-05-03 18:28 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Markus Böck from comment #2)
> For the sake of completion:
> 
> This is the output of gdb --configuration, aka roughly the configuration I
> used:
> 
> configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32  

Thanks.  I thought this was what I did as well, but in fact I used
"--host=i686-w64-mingw32".

I was able to reproduce using your approach.

> I am happy to report however that your proposed patch seems to work and
> gdbserver once again succeeds to link. Thanks!

Great, thank you.
I will commit it soon.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
                   ` (3 preceding siblings ...)
  2021-05-03 18:28 ` tromey at sourceware dot org
@ 2021-05-03 18:42 ` cvs-commit at gcc dot gnu.org
  2021-05-03 18:49 ` tromey at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-03 18:42 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8228833924fa3c92a436a5f938a94dae180773f9

commit 8228833924fa3c92a436a5f938a94dae180773f9
Author: Tom Tromey <tromey@adacore.com>
Date:   Mon May 3 08:57:46 2021 -0600

    Fix x86_64 mingw build

    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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug build/27807] Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext
  2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
                   ` (4 preceding siblings ...)
  2021-05-03 18:42 ` cvs-commit at gcc dot gnu.org
@ 2021-05-03 18:49 ` tromey at sourceware dot org
  5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2021-05-03 18:49 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27807

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |11.1
         Resolution|---                         |FIXED

--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-03 18:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 19:16 [Bug build/27807] New: Link failure on Windows due to undefined reference to win32_Wow64GetThreadContext markus.boeck02 at gmail dot com
2021-05-03 14:04 ` [Bug build/27807] " tromey at sourceware dot org
2021-05-03 14:06 ` tromey at sourceware dot org
2021-05-03 16:32 ` markus.boeck02 at gmail dot com
2021-05-03 18:28 ` tromey at sourceware dot org
2021-05-03 18:42 ` cvs-commit at gcc dot gnu.org
2021-05-03 18:49 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).