Skip to content

DebuggingInSteerSuite

Neo-X edited this page Sep 18, 2015 · 1 revision

Notes on debugging

Need to compile with debug flags and optimizations turned of
./buildall linux Debug

Debugging On Linux

If you want to do something as simple as finding the line that the program segfault on you can use use valgrind

$ valgrind ./steersuite -ai footstepAI -testcace ../../testcases/forest.xml

It will be significantly easier if you use Eclipse + CDT + gdb. You can debug C++ application similar to how you would a java program in eclipse. Lots of breakpoint features and variable inspection.

There are a number of already created debugging launch configurations you can use or copy and work from. They are Here. See the .launch files. That can be directly imported into Eclipse.

In eclipse the base directory is used for running programs. You may need to update some file paths in your config files.

Using Eclipse and CDT and GDB

you just need to execute steersuite from eclipse but you also need to use a proper config file. Eclipse executes everything from the root of the project directory.

Try adding something like "-ai egocentricAI -testcase testcases/forest.xml -config steerstats/configs/egocentricAI-config.xml" In the arguments section of the Debug configuration.

Then make sure in the config file inside the ../build/lib/:build/lib/ take in the config file it look like this. It needs a path relative to the project root to the build/lib directory.