0
$\begingroup$

Rosanswers logo

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,

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Please see https://github.com/ros/ros_comm/issues/223


Originally posted by Benny with karma: 132 on 2014-07-07

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$
0
$\begingroup$

Rosanswers logo

Faced same thing. But I just did launch-prefix="xterm -e gdb --args" instead of launch-prefix="gdb -ex run --args". The former opens gdb in a different xterm window, and you can type in "run". That worked for me


Originally posted by ratneshmadaan with karma: 71 on 2015-09-27

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by curi_ROS on 2019-01-30:
Thank you! This works.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.