Debug Gazebo (without ROS) using GDB

I do not use ROS, only Gazebo 7 on Ubuntu 14.04 (a bit old but I have other dependencies that require me to use 14.04). I built Gazebo from source and it worked fine. Following the instructions I used the command :

cmake -DCMAKE_BUILD_TYPE=Debug ../

to make sure I will be able to use gdb but when I start the program with gdb and I make the program crash, the stack is always empty. Should this be because I did not configure or start gdb correctly?