Debugging VP1
From ATLAS-TRIUMF
Debugging VP1
Recipe passed on by Peter Leimbigler for compiling just one package with debug symbols:
Check out graphics/VP1/VP1Qt and edit graphics/VP1/VP1Qt/share/create-qt4-based-lib
After the section:
if [ "x${CMTCONFIG:${#CMTCONFIG}-4:4}" == "x-dbg" -a "x$PLUGIN" == "x0" ]; then
echo "CONFIG -= release" >> temp.pro
echo "CONFIG += debug" >> temp.pro
add this section before the "else":
elif [ ${PACKAGENAME} == "VP1YourSystemName" ]; then
echo "QMAKE_CXXFLAGS += -g" >> temp.pro
where "VP1YourSystemName" is to be replaced by your system's exact name, or equivalently, by the exact output of the command: cmt show macro_value package
Rebuild VP1Qt.
Touch your system's source file(s) and make. The "-g" option should appear amongst the compiler flags, and a gdb stack trace should reveal line numbers for your system's functions.
Now, to debug the system:
cd into the directory from which you normally run VP1. These instructions assume that this directory contains vp1.py.
gdb python
and at python prompt:
run `which athena.py` -c 'inputFiles=["AOD.pool.root"]' vp1.py
--Isabel 13:37, 20 August 2007 (PDT)

