Cross-target debugging using Fedora and wine

Kalev Lember kalev at smartlink.ee
Thu May 5 09:03:38 UTC 2011


On 05/04/2011 09:37 AM, Christopher Thielen wrote:
> I've got a SDL+OpenGL application written on Linux that cross compiles
> beautifully with MinGW on Fedora. With the exception of no mingw32-ftgl
> package, I didn't really have to do any work at all!

That's good to hear!

mingw32-ftgl sounds like a valuable addition to the Fedora MinGW package
collection, in case you are interested in properly packaging it up.

Seriously, the reason for the Fedora MinGW project to exist in the first
place is to avoid needless duplication of work for everyone who wants to
use same cross compiled libraries. We all are just interested in our own
small set of libraries, but we've worked together and contributed
packages and got a nice set together.

If you want to help with that, come to the #fedora-mingw irc channel on
freenode and we'll get you started with mingw32-ftgl Fedora packaging;
it's not hard at all.


<snip>
> I read something about 'gdbserver' as being a good idea for this but can
> find no such program for Fedora or Fedora-mingw. Anybody know if this is
> the best way to solve my problem and how I can best install it?

I'm glad you asked, because I've just been working on packaging up the
cross compiled gdb and gdbserver.

You can grab an rpm for testing from
http://koji.fedoraproject.org/koji/taskinfo?taskID=3051302

There's a nice guide for using gdbserver under wine at
http://mingw-cross.sourceforge.net/cross_debug.html ; just use the
native "gdb" instead of "i686-pc-mingw32-gdb" as mentioned in the guide.

It basically boils down to this:
- Run gdbserver:
$ wine gdbserver localhost:60000 sample.exe

- In another terminal window, start up the native gdb and connect it to
  the gdbserver:
$ gdb sample.exe
(gdb) target remote localhost:60000
(gdb) continue


-- 
Hope this helps,
Kalev


More information about the mingw mailing list