[Scons-users] sconsign recovery after segfault

John Galbraith jgalb at lanl.gov
Mon Oct 29 13:34:03 EDT 2012


Bill, you are probably right about the debugging and other calling
mechanisms, for simplicity.

Right now, I address this with a python decorator on my functions that
launch threads and other work. The decorator checks argv[0] for 'scons'
instead of 'python' and does special stuff (like instantiating a
Builder). I have other codes that use the same function outside of
scons, and the decorator does something different then (typically set up
matplotlib for gui). This actually is working for me, but might be
overly complicated. I do get to write one function and use it twice
(once for batch processing with scons, once for interactive graphics
outside of scons).

WRT debugging, I have discovered that one can 'gdb python' then 'run
/usr/bin/scons' to get inside of the extension modules. This also works
for me, although I am far from a gdb wizard. It's actually no harder
than non-scons python, at least at the level I know how to use GDB
(which is not well).

John

On 10/29/2012 11:21 AM, scons-users-request at scons.org wrote:

> I don't recommend too much magic (heavy lifting) in your SCons logic.

> In addition to your issues, it makes it harder to test the new logic itself and/or run it outside of SCons, which may make debugging/etc easier.




More information about the Scons-users mailing list