gdbserver not started for remote debugging [message #1743652] |
Sun, 18 September 2016 09:03 |
ofer livny Messages: 4 Registered: September 2016 |
Junior Member |
|
|
Hi all
I have experience with remote debugging of c++ applications on linux ARM targets, and I'm trying to do the same on a new project I'm working on and need your assistance.
Linux target runs open-ssh server, and has gdbserver installed. (Yocto is used to build everything)
Ubuntu host runs eclipse NEON, has Linaro toolchain, and can connect to target using ssh (with name & password).
I've configured a c++ remote application configuration, that is supposed to run the remote binary using gdbserver and connect to it using gdb.
However, when I run this configuration, I get the following output in the console:
Last login: Wed Sep 14 11:53:29 2016 from ofer-pc.adas.local
/usr/bin/gdbserver :2345 /some/path/bin/app;exit
7[r[999;999H[6n8
root@target:~#
console is then interactive, gdbserver did not start.
But I can now run the same gdbserver command in the interactive console, this time manually, successfully. gdb connects etc.
What am I doing wrong?
Can it be a target encoding support issue? Eclipse configuration?
I can't find a way to see what exactly is eclipse running to get connect to the target. Can anyone suggest a way to debug that?
Thanks!
|
|
|
|
Re: gdbserver not started for remote debugging [message #1743802 is a reply to message #1743755] |
Mon, 19 September 2016 17:19 |
ofer livny Messages: 4 Registered: September 2016 |
Junior Member |
|
|
Hi Marc
It is normal to get a root prompt. It is an ARM target that is now in bring-up stage, and root access is all we require at this point.
The exit command at the end of the gdbserver command did not run. It was only printed to console along with the gdbserver command, and then the console became interactive - so I could choose to run gdbserver, exit, or whatever I wish to run on the target, interactively.
I'm using ssh, as mentioned in the original question, and I can easily run gdbserver manually with ssh from bash shell, or from the interactive shell I'm getting in eclipse after gdbserver doesn't start automatically.
Meanwhile I've found these links:
https://community.nxp.com/thread/395341
https://www.eclipse.org/forums/index.php/t/1077899/
which suggest the problem is common to targets that run stuff built by Yocto.
I've tried the same with a target that is setup using buildroot, and things work as expected.
I've verified its the same openssh version on both setups, so its not that.
What can be the difference between buildroot to yocto on this context? Can it be the locale? The shell itself?
Can eclipse be more verbose in the SSH actions it is taking? Can the logs be more verbose?
Thanks!
|
|
|
|
|
|
Re: gdbserver not started for remote debugging [message #1844707 is a reply to message #1818327] |
Wed, 22 September 2021 11:15 |
Tim Howe Messages: 1 Registered: September 2021 |
Junior Member |
|
|
The year is Sept 2021 and I am experiencing this issue with eclipse 2019-09
The command sent to start the remote gdbserver is
gdbserver :2345 /home/analog/ned;exit
The error response is
7[r[999;999H[6nresize: unknown character, exiting.
Manually copying/pasting the same gdbserver launch string into the gdb console causes the whole debug sessionto run correctly.
This same installation of eclipse has operated completely normally with a different remote system, using a different local (cross) gdb and remote gdbserver, so it is likely that this problem is a quirk of either gdbserver or cross-gdb
Thanks
Update: If I cripple /usr/bin/resize on the target (by renaming it) then the debug launch goes through without a hitch. I dont yet know why eclipse would be attempting to use resize on the target or indeed if there is a problem with the resize app on the target (though it appears to work if used stand-alone)
Does anyone know if there is an eclipse script that I can edit to alter the command sequence used to remote launch gdbserver?
[Updated on: Wed, 22 September 2021 14:57] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05527 seconds