So we can get debug symbols from the cython bits.
And add flag handling so we can enable it with --with-debug
.
For win32, this means adding:
/Zi /DEBUG /RTC1 /GS
To the compile phase, and:
/DEBUG
To the linker.
For linux:
-g -ggdb
is probably enough, see Debugging Options(gcc.gnu.org)
The following patch does it: (broken link removed by totaam)
but it breaks because when building gdk_atoms, py2exe adds by default /Ox and this is incompatible with the options I have added
Some pointers:
-g
" and "pyrex_gdb=True
" to the posix builds - to use it, call setup.py
with "--with-debug
"
--pyrex-gdb
option on win32 - you must set DEBUG=1
in win32/MAKE-INSTALLER.BAT
Can you please try and let me know if that helps in debugging the cython code?
The changes do not seem to have any impact, in that the commandlines used for building do not include /DEBUG nor any of the options I mention in the ticket. Adding those options manually doesn't work, per comment:1
ahuillet: please see the links in comment:2, we cannot just add /DEBUG
for cython code
Well, in the end, we need the C files to be compiled with the /DEBUG switch. The changes in r2951 and r2952 don't end up doing that, so the cython code is built without debug symbols.
I don't know what to do about this - close if you feel like it. I do believe it can be useful to have debug symbols in the cython-produced libs, but if that's not feasible we have no choice.
done in r5022 - not sure how useful this is going to be as we rarely ever get any crashes nowadays, but it's there. Just build with:
./setup.py --with-debug
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/291