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

GDB does not run correctly with roslaunch

asked 2015-05-10 14:36:52 -0600

Metalzero2 gravatar image

Hello all,

I am trying to use GDB with roslaunch but I dont know how to. In the .launch file I write

<node pkg="read_kinect_01" name="front_end" type="read_kinect_01_node" launch-prefix="gdb --args" output="streen"/>

but whenever I try to use a command it does not work. If I run "r" (to run) it will run and display and error like it alway does (even when I am not using GDB). But whenever I try to write

break 54

I get a message saying

No symbol table is loaded. Use the "file" command

If I try to run

print x

I get the same message.

After that I looked up "file" but was not able to find anything related to ROS that would help me. I tried

file /ROS/catkin_ws/devel/lib/read_kinect_01/read_kinect_01_node

among other attempts... but nothing (every single time :/ ). What exactly do I need to give to "file" so it will work?

I am using Ubuntu 14.04 LTS with ROS Indigo

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2015-05-11 04:18:37 -0600

BennyRe gravatar image

updated 2015-05-11 04:19:29 -0600

Did you compile your program with Debug symbols? catkin_make -DCMAKE_BUILD_TYPE=Debug

edit flag offensive delete link more

Comments

No, I did not. Works great now. Thanks :)

Metalzero2 gravatar image Metalzero2  ( 2015-05-13 06:05:54 -0600 )edit
1

answered 2015-05-12 05:22:11 -0600

Metalzero2 gravatar image

updated 2015-05-12 05:22:29 -0600

As @BennyRe commented, I needed to compile my program using:

catkin_make -DCMAKE_BUILD_TYPE=Debug
edit flag offensive delete link more

Comments

2

Please mark the answer by @BennyRe as accepted. He answered your question, so it is only fair.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-12 11:10:05 -0600 )edit

@gvdhoorn First, I did put in name in the answer, so obvious I want to give credit where credit is due. Second, how did you make his "comment" to an "answer" ? I tried to do it but could not find out how (that's why I made the answer my self) :)

Metalzero2 gravatar image Metalzero2  ( 2015-05-13 06:04:28 -0600 )edit

I didn't actually convert it, I just commented :). I'm not sure whether only moderators/administrators can do it, but it is possible.using one of the options under more (bottom right).

gvdhoorn gravatar image gvdhoorn  ( 2015-05-13 07:11:13 -0600 )edit

oh OK then, cool. Thanks in any case ;)

Metalzero2 gravatar image Metalzero2  ( 2015-05-13 11:02:45 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2015-05-10 14:36:52 -0600

Seen: 2,258 times

Last updated: May 12 '15