Remote GDB multiple symbol files

Answered

I'm using Ubuntu 14.04, CLion 2016.3 and the new Remote GDB feature to debug a ROS (Robot Operating System) node launched with

roslaunch <node_name> <file_name>.launch

The <file_name>.launch is an XML file where I launch the node. The gdbserver is launched alongside via the XML parameter launch-prefix="gdbserver localhost:10000". Then, I set up a GDB Remote Debug configuration as follows:

The "Symbol file:" setting in the above window allows to specify a single symbol file. However, my project consists of several .cpp files which I would like to set breakpoints in! How do I specify several symbol files, and where do I locate the symbol files in the cmake-build-debug folder? Thank you for helping.

1 comment
Comment actions Permalink

Hi,

Symbol file is a binary file with debug symbols, not a source one. Usually the executable you run is self-sustained, that is it can be used as a symbol file by itself. Moreover, recent GDB (not sure the exact version installed with Ubuntu 14.04) can transfer symbols from gdbserver (it should be also not too old) automatically. I would try running the debug configuration without setting a symbol file to see whether it works out of the box, and if not, then specifying the executable file as a symbol file. 

As far as I understand, `roslaunch` is a wrapper command that runs the compiled executable under the hood (possibly with a given prefix like gdbserver). You should figure out what exactly it runs, and most likely that would be the necessary symbol file.

0

Please sign in to leave a comment.