[PySide] Building a debug PySide+python+valgrind [Newbie dev Tutorial ? :-)]

Stefan Champailler schampailler at skynet.be
Sun Apr 14 10:31:15 CEST 2013


Ok. Whenever I'll start debugging again, I'll read your instruction 
carefully :-) And if that ends up in a nice debug build procedure, I'll 
post it here again.

Now for the *proper* way to track bugs, that indeed depends on the kind 
of bug. I inconsciously had in mind stacktrace and memory leaks...

Best regards,

Stefan


On 04/13/2013 09:14 PM, John Ehresman wrote:
> On 4/13/13 8:03 AM, Stefan Champailler wrote:
>> Dear ml,
>>
>> A while ago I posted my notes about compiling PySide in debug mode +
>> python + valgrind (see below).
>>
>> I've got some questions :
>>
>> 1. Do these notes seem right to you ? I ask because I'm not very
>> knowledgeable about cmake and I may be doing things that are just not
>> necessary (such as setting all those env. variables, or maybe not using
>> the PySide build scripts to their full power)
> Some changes / comments:
>   * the apiextractor and generatorrunner directories are no longer needed
> (the code is now in shiboken).
>   * I think the environment variables other than PATH and LD_LIBRARY_PATH
> are only used withing the script itself; in other words, the child cmake
> and other processes do not look them up in the environment
>   * it's worth noting that this is Linux specific; OS X needs
> DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH and win32 only needs PATH.
>
>> 3. Once I had built pyside debug, python debug  and valgrind, I started
>> to use them. However it didn't help me much to track some memory leaks.
>> So i was wondering if that's a productive way of looking at bugs. Maybe
>> there are more powerful tools to track issues ? I was dreaming of a way
>> to print the list of PySide managed objects...
> Are you looking for shiboken.getAllValidWrappers() ?  As far as if
> valgrind is a productive way to look at bugs, I think it depends on the
> bug.  I do think debug enabled builds of pyside, python, and qt help a
> lot when tracking down problems in C++ level code.
>
> Thanks,
>
> John
>

-- 
Timeo Danaos et dona ferentes




More information about the PySide mailing list