Xpra: Ticket #291: add a debug build option to setup.py

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)



Tue, 12 Mar 2013 17:34:16 GMT - ahuillet:

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


Wed, 13 Mar 2013 11:20:53 GMT - Antoine Martin: owner, status changed

Some pointers:



Can you please try and let me know if that helps in debugging the cython code?


Wed, 13 Mar 2013 18:11:06 GMT - ahuillet:

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


Wed, 20 Mar 2013 14:24:07 GMT - Antoine Martin:

ahuillet: please see the links in comment:2, we cannot just add /DEBUG for cython code


Wed, 20 Mar 2013 14:32:18 GMT - ahuillet:

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.


Fri, 12 Jul 2013 07:53:24 GMT - ahuillet: owner, status changed

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.


Tue, 24 Dec 2013 11:31:58 GMT - Antoine Martin: status, description changed; resolution set

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

Sat, 23 Jan 2021 04:50:46 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/291