I'm trying to debug my node with gdb but I consistently get two errors, and I don't know if they are related.
First of all, I added launch-prefix="gdb -ex run --args"
to my node as instructed in the tutorial.
Now, when I launch my node, I get this error about 30 times during the initialization phase: tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device
.
Also, when I try to close the node, it stops a few threads but seems to hang and not stop the other threads. I do not normally have threading problems.
Are these problems related? I know that the error that I got was reported with Gazebo in the past, but here it has nothing to do with it.
Originally posted by Benoit Larochelle on ROS Answers with karma: 867 on 2012-11-11
Post score: 4
Original comments
Comment by Lorenz on 2012-11-12:
I'm not quite sure why you are getting the tcsetpgrp errors but maybe the terminal roslaunch provides does not support all features gdb wants.
Comment by yuquan on 2013-01-21:
I used this option: launch-prefix="gdb --args"
to launch gdb in my terminal however I got the same error:
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
each time I hit or continue from a break point.
Comment by bot777 on 2021-09-19:
Hello All,
I have the same problem... launch file is below (followed as above and changed the launch_prefix):
<launch>
<arg name="debug" default="false"/> <arg unless="$(arg debug)" name="launch_prefix" value=""/> <arg if="$(arg debug)" name="launch_prefix" value="xterm -e gdb --args"/>
<arg name="config" default="false"/> <arg unless="$(arg config)" name="command_args" value=""/> <arg if="$(arg config)" name="command_args" value="-d $(find inmoov6_moveit_config)/launch/moveit.rviz"/>
<node name="$(anon rviz)" launch-prefix="$(arg launch_prefix)" pkg="rviz" type="rviz" respawn="false" args="$(arg command_args)" output="screen"> <rosparam command="load" file="$(find inmoov6_moveit_config)/config/kinematics.yaml"/> </node>
</launch>
but I still get the same error message: tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device
Please advice on what I need to do specifically? to resolve it,