Debugging VP1


Jump to: navigation, search

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" >>
    echo "CONFIG += debug" >>

add this section before the "else":

elif [ ${PACKAGENAME} == "VP1YourSystemName" ]; then
    echo "QMAKE_CXXFLAGS += -g" >>

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

gdb python

and at python prompt:

run `which` -c 'inputFiles=["AOD.pool.root"]'

--Isabel 13:37, 20 August 2007 (PDT)

Personal tools