Building FlightGear - Cross Compiling: Difference between revisions

Jump to navigation Jump to search
Line 283: Line 283:
* [http://mingw-cross.sourceforge.net/cross_debug.html Cross Debug on Linux and Wine]
* [http://mingw-cross.sourceforge.net/cross_debug.html Cross Debug on Linux and Wine]
* [http://ftp.winehq.org/pub/wine/docs/en/winedev-guide.html Wine Developer's Guide]
* [http://ftp.winehq.org/pub/wine/docs/en/winedev-guide.html Wine Developer's Guide]
=== GDB under Windows ===
If you're familiar with using GDB, you can compile GDB to be used in Windows through MXE. Just run <syntaxhighlight lang="bash">make gdb</syntaxhighlight> for the same target as the target of the application you're planning on debugging (i.e. x86_64-w64-mingw32.shared gdb for x86_64-w64-mingw32.shared applications). To use GDB, you can try running it under Wine, but for me, the GDB prompt didn't work correctly. Whatever I typed into the GDB prompt (<nowiki>run</nowiki>, <nowiki>continue</nowiki>, etc.) resulted in nothing happening, and I had to end GDB by issuing a <nowiki>killall</nowiki> command in Linux. (Now that I think about it, it could be that GDB is looking for a Windows newline (\r\n), when only a Linux newline is being sent instead (\n).)
Instead I recommend you run GDB in an actual Windows machine. To do so, from Windows Explorer, you can Shift+Right Click and then select "Open new command prompt" (or some working to that effect). Then, you can run <nowiki>gdb.exe name-of-program.exe</nowiki>. All features of Linux GDB seem to work except for interrupting a program through Control-C.


== MXE ==
== MXE ==
60

edits

Navigation menu