Ask Your Question
1

How to get meaningful backtraces in ROS?

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

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

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

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 imageFelix Tr ( 2011-11-30 02:27:56 -0600 )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 imageroehling ( 2011-11-30 18:18: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

Stats

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

Seen: 174 times

Last updated: Dec 02 '11