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 search and apparently the -g flag is never passed to g++.
Is -g automatically added when my build type is "Debug"? Does anyone know why GDB gives me this error?

Thanks
Chris
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to