You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to do remote debugging in SSH mode. I wrote a very simple program, but the program stopped where there was no breakpoint. Continue operation will be reported wrong.
Tip: unable to open "strlen.S": cannot find file: /home/build/eglibc-SvCtMH/eglibc-2.19/sysdeps/x86_64/strlen.S.
Yes, in order to verify this problem, I connect to local with SSH,The remote and local are actually the same executable file. but it's OK to use local debugging.
uli2k@uli2k-T430:~/hello/devel/lib/hello$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) file /home/uli2k/hello/devel/lib/hello/hello
Reading symbols from /home/uli2k/hello/devel/lib/hello/hello...done.
(gdb) break /home/uli2k/hello/src/hello/src/hello.cpp:7
Breakpoint 1 at 0x401041: file /home/uli2k/hello/src/hello/src/hello.cpp, line 7.
(gdb) r
Starting program: /home/uli2k/hello/devel/lib/hello/hello
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/home/uli2k/hello/devel/lib/hello/hello
Breakpoint 1, main (argc=1, argv=0x7fffffffddd8)
at /home/uli2k/hello/src/hello/src/hello.cpp:7
7 ros::init(argc, argv, "hello_node"); !!!!!!!!!!!!!!!!!!!!!!attention here. It is OK!!!!!!!!!!!!!!!!!!!!!!!!!!
(gdb) n
8 for (int i = 0; i < argc; i++)
(gdb) n
9 printf("%s\n", argv[i]);
(gdb) n
/home/uli2k/hello/devel/lib/hello/hello
8 for (int i = 0; i < argc; i++)
(gdb) n
10 return 0;
(gdb) c
Continuing.
[Inferior 1 (process 3714) exited normally]
(gdb) q
The ssh issues should be solved already.
Setting of the "main" breakpoint will also be able through the new settings stopAtConnect and stopAtEntry with the 0.26 release and setting of breakpoints in general should be improved with #313 (also target for 0.26).
As this is an old issue and already seems to be fixed -> closing. Feel free to update if you still see issues with the recent version and we can re-open.
Activity
[-]ssh dbgremote debug[/-][+]ssh gdb remote debug error[/+]uli2k commentedon Aug 10, 2017
I downloaded the eglibc library, put it in /home/build, and run to strlen.S, 106 line, the following error occurred

WebFreak001 commentedon Aug 10, 2017
is the source on both sides (locally and remotely) the same and did you recompile it on the ssh side?
uli2k commentedon Aug 11, 2017
Yes, in order to verify this problem, I connect to local with SSH,The remote and local are actually the same executable file. but it's OK to use local debugging.
uli2k commentedon Aug 11, 2017
Sorry, I made a mistake. The correct test program source is this.
There is a stack trace error after entering ros:: init function in SSH remote debug mode, but the local gdb debugging is OK.
uli2k commentedon Aug 12, 2017
I found this might be GDB's Bug.There is a problem with the MI2 mode command, but the CLI mode is OK.
this is log.
MI2 MODE:
CLI MODE:
uli2k commentedon Aug 12, 2017
My program must run in Bash login mode. Is it logon mode when using the SSH connection?
WebFreak001 commentedon Aug 12, 2017
it should use your default shell but I don't think it can receive any input from stdin, try attaching instead of launching over ssh if you need that
uli2k commentedon Aug 12, 2017
The ros:init function just takes all the environment variables of bash,no stdio.What should I do?
WebFreak001 commentedon Aug 12, 2017
over ssh it does get environment variables, you just won't have those that setup because of some commands you run when you login.
GitMensch commentedon Mar 2, 2022
The ssh issues should be solved already.
Setting of the "main" breakpoint will also be able through the new settings
stopAtConnectandstopAtEntrywith the 0.26 release and setting of breakpoints in general should be improved with #313 (also target for 0.26).As this is an old issue and already seems to be fixed -> closing. Feel free to update if you still see issues with the recent version and we can re-open.