Re: [CMake] CMake and GDB

2012-09-19 Thread GOO Creations
Stupid, stupid me. Yes it works, I just ran GDB with "start" instead of "run". Thanks for your help Nils. Chris On 2012/09/19 04:56 PM, Nils Gladitz wrote: "cmake -DCMAKE_BUILD_TYPE=Debug" should be enough to get gdb debuggable binaries. Is the process which you intend to debug running when y

Re: [CMake] CMake and GDB

2012-09-19 Thread Nils Gladitz
"cmake -DCMAKE_BUILD_TYPE=Debug" should be enough to get gdb debuggable binaries. Is the process which you intend to debug running when you ask gdb for a backtrace? You will only be able to get a backtrace if the process has been started and has not yet exited. e.g.: gdb ./mybin break main run

[CMake] CMake and GDB

2012-09-19 Thread GOO Creations
Hi, I'm trying to debug my program using GDB. I've done the following: -DCMAKE_BUILD_TYPE=Debug SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g") But whenever I run GDB and do a backtrace, I get a message: "No Stack". I've done a Google