Use of gdb and valgrind




Use of gdb and valgrind

Postby chloesdaddy » Thu 18. Sep 2014, 15:02

Hi all,

I had a look at many tuto about ros in order to run gdb or valgrind.
The solution might be to put this in a file :
launch-prefix="gdb -ex run --args" : run your node in gdb in the same xterm as your launch without having to type run to start it
launch-prefix="valgrind" : run your node in valgrind

(cf : http://wiki.ros.org/roslaunch/Tutorials ... 20or%20GDB)

But I cannot find in which file I have to put this in order to have gdb or valgrind working.

Can you help me ?

Best regards
chloesdaddy
 
Posts: 8
Joined: Thu 14. Aug 2014, 23:28

by Advertising » Thu 18. Sep 2014, 15:02

Advertising
 

Re: Use of gdb and valgrind

Postby Peter Lehner » Fri 19. Sep 2014, 07:17

chloesdaddy wrote:I had a look at many tuto about ros in order to run gdb or valgrind.
The solution might be to put this in a file :
launch-prefix="gdb -ex run --args" : run your node in gdb in the same xterm as your launch without having to type run to start it
launch-prefix="valgrind" : run your node in valgrind

This syntax is used in ros launch files: http://wiki.ros.org/roslaunch. "Launch files usually bring up a set of nodes for the package that provide some aggregate functionality." You can specify the launch-prefix in the node tag.
Nevertheless for debugging I would recommend starting your program directly with gdb or valgrind:
$ gdb /path/to/your/ros/workspace/devel/lib/your_package/your_executable
Peter Lehner
 
Posts: 53
Joined: Fri 27. Jun 2014, 14:33


Return to Stage 1 - Simulation

Who is online

No registered users

cron