ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to turn on generating the debug info?

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

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
2

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

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 -0500

sterlingm gravatar image

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

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 image sd  ( 2014-05-26 07:06:58 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 1,871 times

Last updated: May 26 '14