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

GDB Debugging Symbols for Rviz

asked 2019-09-25 17:41:13 -0500

mjs gravatar image

updated 2019-09-25 17:49:40 -0500

I have a core dump file that was saved after a segmentation fault in a rviz QT plugin. This plugin has been created in an independent package. However, when I try opening the file in gdb and view the stack trace, the required debugging symbols are not This loaded so the functions listed just appear as ??. I've tried using the file command to load the debugging symbols from where rviz is installed but it couldn't find any symbols. Does anyone know how to load these debugging symbols ?

Thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-09-25 23:53:07 -0500

ahendrix gravatar image

updated 2019-09-26 16:25:25 -0500

The binary ROS packages that you can install through apt are not built with debugging symbols, and the default build mode for catkin does not include debugging symbols either.

You will probably need to check out the source for the exact version of rviz that you're using, and built it and your plugin from source in debug mode in order to debug this.

edit flag offensive delete link more

Comments

This is the answer, but I would add that you'd probably want to checkout the exact version of RViz that generated the core file.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-26 03:38:16 -0500 )edit

Thank you!

mjs gravatar image mjs  ( 2019-09-26 13:13:39 -0500 )edit
0

answered 2019-09-26 04:21:56 -0500

peci1 gravatar image

updated 2019-09-26 04:28:56 -0500

In melodic, the debugging symbols are in an extra package:

sudo apt install ros-melodic-rviz-dbgsym

However, it seems that kinetic builds do not generate these.

Or, if you're not on Ubuntu, there could be a similar package available for your platform. Of course, these are the symbols resulting from RelWithDebInfo build type, so it isn't 100% precise, but it should be enough to give you a gist about where the code is failing.

However, if the bug is in your plugin, then you obviously also have to build your plugin with debugging symbols to get the full stack trace.

Note below: if you won't find the symbols for kinetic, you can always (pretty easily) build rviz locally with all symbols, even in debug mode, and then run the program again in the locally built rviz.

edit flag offensive delete link more

Comments

Note that the OP tagged the question with kinetic, and afaik, dbgsym pkgs are not available for Kinetic and older.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-26 04:23:44 -0500 )edit

Yeah, I've noticed that the second I sent the answer :) I've edited the answer to be more verbose about ROS versions.

peci1 gravatar image peci1  ( 2019-09-26 04:28:23 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-09-25 17:41:13 -0500

Seen: 956 times

Last updated: Sep 26 '19