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

How to get meaningful backtraces in ROS?

asked 2011-11-30 00:41:30 -0500

Felix Tr gravatar image

Hello all,

I have a question and I would be grateful if you could find time to answer. I have a segmentation fault using Linux + ROS + C, and I want to analyse it. What I do is the next:

ulimit -c unlimited

compiling + running

gdb my_executable core

bt

But I receive "??" instead of functions names.

In order to do solve it, I have uncommented the next line in CmakeLiskts.txt file: set(ROS_BUILD_TYPE RelWithDebInfo).

And I also have tried to use: set(ROS_BUILD_TYPE Debug)

I still have problems...

Your help will be more than appreciated.

Felix.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
-1

answered 2011-12-02 06:56:56 -0500

Felix Tr gravatar image

Thank you for your answers, the problem (as always) obvious: wrong executable name. Still, it is very nice to know, that help can be found here :).

edit flag offensive delete link more
0

answered 2011-11-30 01:28:54 -0500

Did you recompile everything after changing the build type?

rosmake --pre-clean

will do it.

edit flag offensive delete link more

Comments

I did, what you have suggested...All the same...
Felix Tr gravatar image Felix Tr  ( 2011-11-30 02:27:56 -0500 )edit
Then either your program destroyed the stack frame before crashing (think buffer overrun), or it has something to do with you using a core file (I usually run the program in gdb directly).
roehling gravatar image roehling  ( 2011-11-30 18:18:58 -0500 )edit

Question Tools

Stats

Asked: 2011-11-30 00:41:30 -0500

Seen: 275 times

Last updated: Dec 02 '11