xpra icon
Bug tracker and wiki

Opened 7 years ago

Closed 6 years ago

#291 closed task (fixed)

add a debug build option to setup.py

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.9
Component: android Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

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)

Change History (7)

comment:1 Changed 7 years ago by 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

Last edited 6 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 7 years ago by Antoine Martin

Owner: changed from Antoine Martin to ahuillet
Status: newassigned

Some pointers:


  • r2951 added "-g" and "pyrex_gdb=True" to the posix builds - to use it, call setup.py with "--with-debug"
  • r2952 allows us to build with --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?

comment:3 Changed 7 years ago by 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

comment:4 Changed 7 years ago by Antoine Martin

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

comment:5 Changed 7 years ago by 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.

comment:6 Changed 6 years ago by ahuillet

Owner: changed from ahuillet to Antoine Martin
Status: assignednew

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.

comment:7 Changed 6 years ago by Antoine Martin

Description: modified (diff)
Resolution: fixed
Status: newclosed

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
Note: See TracTickets for help on using tickets.