[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Using gdbserver with Wine (was: odd/eraseme_error 69d06e9 10/1

From: Vadim Zeitlin
Subject: Re: [lmi] Using gdbserver with Wine (was: odd/eraseme_error 69d06e9 10/10: Attempt to find a problem)
Date: Wed, 7 Jul 2021 18:30:17 +0200

On Wed, 7 Jul 2021 15:26:57 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> > GC> >  Generally speaking, the best technique for debugging problems 
under Wine [...snip...]
GC> > GC> 
GC> > GC> That never worked well for me.
GC> > 
GC> >  Would you be interested in describing this in more details, so that I
GC> > could perhaps try to diagnose the problem?
GC> I believe we've been down that road before.

 Sorry, I could be forgetting something, but I asked this precisely because
I don't think we have. I do know that you've unsuccessfully tried other
approaches involving winedbg, but I don't think I've ever heard anything
back from you after advising you to use gdbserver ~5 years ago.

 I also find it very surprising that you seem to have some doubts about
whether this is going to work at all, when IMO there is absolutely no
reason it shouldn't -- this isn't some esoteric and impractical hack used
only by cognoscenti, gdbserver is, unlike winegdb, a well-maintained
program used by many people and it works perfectly reliably with gdb. There
is really no obvious reason why it shouldn't work out of the box for you,
just as it does for me -- in fact, I've just retried it in Debian Sid
environment and had no problem at all with debugging lmi with it. Just for
the record, all I did was to:

0. Build lmi with debug info, i.e. "-g" or, as the official makefiles do
   it, with "-ggdb".

1. Install the required packages:

    # apt install gdb-mingw-w64 gdb-mingw-w64-target

2. Run the program to debug under gdbserver:

    $ wine Z:/usr/share/win64/gdbserver.exe localhost:12345 lmi_wx.exe

   (for 32-bit build you would use /usr/share/win32/gdbserver.exe)

3. Run gdb and connect to the server:

    $ x86_64-w64-mingw32-gdb lmi_wx.exe
    (gdb) set solib-search-path ...directory with wx DLLs...
    (gdb) target extended-remote localhost:12345

   (you'd use i686-w64-mingw32-gdb for 32-bit binaries)

Then it's possible to debug normally, with full symbols etc support.

GC> Effort would be better spent on making the GUI test work under
GC> pc-linux-gnu, so that 'wine' could be avoided more completely.

 I partially agree with this, but I don't think it's realistic to expect to
be always able to avoid having to test, or debug, the MSW version too.
There are, and will remain, differences between them and having a debugger
at hand is still very useful with it.

GC> But that doesn't matter right now

 Of course not, but I think it might matter the next time you encounter a
problem that could be found, if not resolved, in 5 minutes with debugger or
in an hour without it.


Attachment: pgpR5cRvk622d.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]