Previously, I compiled the application with the "make" command but by default, it created build instead of debug executables. So I had to enable debug compilation. In order to do that, I had to do the following:
- Open up the 3D Toolkit's CMakeList.txt file in a text editor.
- Locate the line
set (CMAKE_BUILD_TYPE "" CACHE INTERNAL "" FORCE)
- Change the above line to the following:
set (CMAKE_BUILD_TYPE "Debug")
- Now recompile the application.
Now, the debugger gdb should be able to load the debug symbols and the source code can be stepped through, as shown below.