I’ve managed to compile git DDA on windows and updated wiki guide: http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile
Original guide was outdated because DDA now uses C++11, which old mingw (and also visual studio 2010 and 2012) doesn’t understand.
Unfortunately gdb bundled with mingw-w64 doesn’t “like” the resulting executable and won’t easily debug it. I’m not that good at gdb and I couldn’t get google to tell me why does my gdb stop being interactive when the game is running. Older gdb and visual studio debugger don’t understand the symbols.
I have a crashing save (something with spitter acid decaying in house) which I’d like to debug.
There’s probably a way, but a far easier way is to make a zip of a save before the crash, upload it to somewhere like dropbox, and make an issue on the github about it. List the version string, exact steps to reproduce, and the savefile. Some dev will definitely check it out.
and the version string is the hex that displays on the center of the main menu, as well as the title bar.
I’ve only run into this issue once myself, there are different versions of executables, and gdb has to be recent enough to understand the executable the compiler is creating. Newer gdb might do it, though installing it on windows might not be that simple.
Is gdb ever interactive when the game is running? The way I’ve always used it, either gdb or the application are paused at all times. To investigate things you have to set breakpoints in code you want to examine. Crashes are easier though, because gdb intercepts the crash signal and starts itself, so you can examine the state of the crashed program.
The gdb in mingw-w64 is supposed to be as new as gcc bundled with it, I think.
I think I recall being able to force the gdb to break immediately at keypress, but I couldn’t do it when debugging DDA with mingw-w64’s gdb. It couldn’t catch crashes either, only printing 2 warnings about invalid parameters sent to functions and quitting as if the application closed correctly (except for error code). Debug version added an error msgbox, which I didn’t get in release.
I uploaded the save at https://github.com/CleverRaven/Cataclysm-DDA/issues/8891 now, but I’ll probably retry debugging later. Software either hates me, or loves me and wants me to help, because I attract bugs like a deadline covered in fruit juice.
I’ve found that arming gdb on mine (Code::Blocks 13.12) seems to break the evac shelter spawn–starts with curtains open-- but is good at catching segfaults. That’s about all I’ve used it for.