Ask Your Question
1

How to turn on generating the debug info?

asked 2014-05-26 06:39:39 -0600

sd gravatar image

Debug symbols information is missing from my node built from cpp file with catkin_make in hydro. I need it to debug the node with the gdb. How to turn on generating the debug info?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-05-26 07:07:08 -0600

Dirk Thomas gravatar image

If you build the package from source you might want to set the CMAKE_BUILD_TYPE to either Debug or RelWithDebInfo (see http://www.cmake.org/Wiki/CMake_Usefu... ) when invoking cmake:

catkin_make -DCMAKE_BUILD_TYPE=Debug
edit flag offensive delete link more
0

answered 2014-05-26 06:49:56 -0600

sterlingm gravatar image

updated 2014-05-26 06:55:35 -0600

Add the following to your CMakeLists.txt:

set (CMAKE_CXX_FLAGS "-g")
edit flag offensive delete link more

Comments

it worked. thank you.

sd gravatar imagesd ( 2014-05-26 07:06:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-26 06:39:39 -0600

Seen: 911 times

Last updated: May 26 '14