Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » automatic dsf remote debugging launcher won't start gdbserver on remote target(automatic dsf remote debugging launcher won't start gdbserver on remote target)
automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1695745] Mon, 18 May 2015 21:25 Go to next message
Tim Black is currently offline Tim BlackFriend
Messages: 20
Registered: September 2009
Junior Member
Eclipse CDT isn't automatically starting gdbserver on my remote target, when using a GDB/DSF Automatic Remote Debugging Launcher. Instead it presents a "Remote Shell" console with the correct gdbserver command printed, but not entered:

Last login: Sat May  9 04:11:26 2015 from tblack-wheezy.local
echo $PWD'>'
gdbserver :2345 /tmp/MyApp;exit
zynq:~$ 


From this prompt, I can manually run gdbserver by entering the same command:

gdbserver :2345 /tmp/MyApp
Process /tmp/MyApp created; pid = 993
Listening on port 2345
Remote debugging from host 172.20.15.8


and Eclipse CDT then starts the local gdb and connect to gdbserver, and successfully runs/debugs my remote app.

Dev Host is intel i686 Debian Linux.
Remote target is Zynq/ARM Linux
gdb/gdbserver versions are 7.7.1.
(Eclipse installation details below)
Remote debugging using gdb/gdbserver with same platform and application work fine.

So I'm trying to figure out why Eclipse CDT is hanging up at the very beginning. I've not had this problem with other targets. Since the problem is happening at the very beginning of the launch process, there is no useful information in the "Remote Shell" console and there is not yet any gdbtraces console (since gdb hasn't been started at the time of the problem).

The tail of the eclipse .log file acknowledges the error:

tblack@tblack-wheezy:~/workspace$ tail ~/workspace/.metadata/.log

!ENTRY org.eclipse.cdt.launch.remote 4 106 2015-05-18 13:55:02.717
!MESSAGE Could not start gdbserver on the remote host. See console output for more details.


But as I said, the console doesn't show any information. When I run the launcher, the Remote Shell console is opened and I am dumped to a shell prompt on the remote target. No commands are uttered by Eclipse CDT.

Here is the relevant portion of my launcher file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.cdt.launch.remoteApplicationLaunchType">
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
<listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="/opt/poky/1.7.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_ON_FORK" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value="zynq.gdbinit"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.HOST" value="172.20.102.15"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.PORT" value="2345"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REMOTE_TCP" value="true"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.TRACEPOINT_MODE" value="TP_NORMAL_ONLY"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="true"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdbserver"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="MyApp"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="MyProject"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<booleanAttribute key="org.eclipse.cdt.launch.remote.RemoteCDSFDebuggerTab.DEFAULTS_SET" value="true"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_COMMAND" value="gdbserver"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_GDBSERVER_PORT" value="2345"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_PRERUN_CMDS" value=""/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_SKIP_DOWNLOAD_TO_TARGET" value="true"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_TARGET_PATH" value="/tmp/MyApp"/>
</launchConfiguration>

I have tried also with org.eclipse.cdt.launch.DEBUGGER_ID using the full path to gdbserver on the remote target. No dice. (I knew it wouldn't work bc gdbserver is on that user's PATH).

And, for completeness, the gdbinit file zynq.gdbinit contains:
set sysroot /opt/poky/1.7.1/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
show sysroot
show solib-search-path


Installation Details:

Kepler Service Release 2
Build id: 20140212-2123

CollabNet Merge Client	2.2.4	com.collabnet.subversion.merge.feature.feature.group	CollabNet
  Eclipse CORBA Plug-in	0.7.0.218	net.sf.eclipsecorba.feature.group	eclipsecorba.sf.net
  Eclipse IDE for C/C++ Developers	2.0.2.20140210-0834	epp.package.cpp	null
    C/C++ Call Graph Visualization	1.1.0.201402102340	org.eclipse.linuxtools.callgraph.feature.feature.group	Eclipse Linux Tools
    C/C++ Library API Documentation Hover Help	1.0.0.201402102340	org.eclipse.linuxtools.cdt.libhover.feature.feature.group	Eclipse Linux Tools
    ChangeLog Management Tools for C/C++	2.8.0.201402102340	org.eclipse.linuxtools.changelog.c.feature.group	Eclipse Linux Tools
    Eclipse Platform	4.3.2.M20140206-1000	org.eclipse.platform.ide	null
    EPP CPP Feature	2.0.2.20140210-0834	org.eclipse.epp.package.cpp.feature.feature.group	Eclipse Packaging Project
    GCov Integration	1.1.0.201402102340	org.eclipse.linuxtools.gcov.feature.group	Eclipse Linux Tools
    GDB Tracepoint Analysis	1.2.1.201402102340	org.eclipse.linuxtools.gdbtrace.feature.group	Eclipse Linux Tools
    GProf Integration	2.0.0.201402102340	org.eclipse.linuxtools.gprof.feature.feature.group	Eclipse Linux Tools
    Library Hover help for devhelp documentation	1.0.0.201402102340	org.eclipse.linuxtools.cdt.libhover.devhelp.feature.feature.group	Eclipse Linux Tools
    LTTng - Linux Tracing Toolkit	2.2.1.201402102340	org.eclipse.linuxtools.lttng2.feature.group	Eclipse Linux Tools
    LTTng Kernel Analysis	2.2.1.201402102340	org.eclipse.linuxtools.lttng2.kernel.feature.group	Eclipse Linux Tools
    OProfile Integration	1.1.1.201402102340	org.eclipse.linuxtools.oprofile.feature.feature.group	Eclipse Linux Tools
    Perf Integration	1.2.0.201402102340	org.eclipse.linuxtools.perf.feature.feature.group	Eclipse Linux Tools
    RPM Import/Export/Building and Editing Tool	1.0.0.201402102340	org.eclipse.linuxtools.rpm.feature.group	Eclipse Linux Tools
    SystemTap IDE and Visualization Tools	2.1.0.201402102340	org.eclipse.linuxtools.systemtap.feature.group	Eclipse Linux Tools
    Valgrind Tools Integration	2.0.0.201402102340	org.eclipse.linuxtools.valgrind.feature.group	Eclipse Linux Tools
  JNA Library	3.2.7	com.sun.jna.feature.group	null
  PyDev for Eclipse	3.4.1.201403181715	org.python.pydev.feature.feature.group	Aptana
  Pydev Mylyn Integration	0.4.0	org.python.pydev.mylyn.feature.feature.group	Fabio Zadrozny
  Subclipse (Required)	1.6.18	org.tigris.subversion.subclipse.feature.group	tigris.org
  Subclipse Integration for Mylyn 3.x (Optional)	3.0.0	org.tigris.subversion.subclipse.mylyn.feature.group	tigris.org
  Subversion Client Adapter (Required)	1.6.12	org.tigris.subversion.clientadapter.feature.feature.group	tigris.org
  Subversion JavaHL Native Library Adapter (Required)	1.6.17	org.tigris.subversion.clientadapter.javahl.feature.feature.group	tigris.org
  Subversion Revision Graph	1.0.9	org.tigris.subversion.subclipse.graph.feature.feature.group	tigris.org
  SVNKit Client Adapter (Not required)	1.6.15	org.tigris.subversion.clientadapter.svnkit.feature.feature.group	tigris.org
  SVNKit Library	1.3.5.7406	org.tmatesoft.svnkit.feature.group	TMate Software

[Updated on: Mon, 18 May 2015 22:18]

Report message to a moderator

Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1695846 is a reply to message #1695745] Tue, 19 May 2015 18:28 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
My guess is that your PATH is not set when doing the Eclipse remote connection and CDT cannot find gdbserver.
I recommend putting the full path to gdbserver in your launch configuration (Debugger tab -> Gdbserver Settings subtab -> Gdbserver path text box)

Marc
Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1695847 is a reply to message #1695846] Tue, 19 May 2015 18:33 Go to previous messageGo to next message
Tim Black is currently offline Tim BlackFriend
Messages: 20
Registered: September 2009
Junior Member
Already tried that, Marc. It was buried in my long post:

Quote:
I have tried also with org.eclipse.cdt.launch.DEBUGGER_ID using the full path to gdbserver on the remote target. No dice. (I knew it wouldn't work bc gdbserver is on that user's PATH).


It doesn't work with or without full path in the Gdbserver path text box. Remember, I can manually run gdbserver at prompt with no path, successfully: "gdbserver :2345 /tmp/MyApp". It is only CDT's attempt at automatically running the same command that is not working.
Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1695850 is a reply to message #1695847] Tue, 19 May 2015 18:43 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Depending on your shell setup, the PATH variable can be set when you login to the remote and then type in 'gdbserver', while not be set when running 'gdbserver' directly without doing an explicit login. For example in my case

Will find gdbserver:
> ssh RemoteHost
RemoteHost> gdbserver

Will not find gdbserver:
> ssh RemoteHost gdbserver

Are you sure you have the right full path in the launch?
Just to be sure, I'd login by hand and do 'which gdbserver' to check the path.
Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1695855 is a reply to message #1695850] Tue, 19 May 2015 19:44 Go to previous messageGo to next message
Tim Black is currently offline Tim BlackFriend
Messages: 20
Registered: September 2009
Junior Member
Sorry if I wasn't clear, Marc, but yes I had verified that gdbserver is on PATH (/usr/bin), and it makes no difference whether I enter "gdbserver" or "/usr/bin/gdbserver" in the Gdbserver path text box. Here's what the Remote Shell looks like after I launch. The red line is the one I type manually. As you can see what I type is echoed by the connection (presumably this is RSE)..

Last login: Sun May 10 02:46:06 2015 from tblack-wheezy.local
echo $PWD'>'
gdbserver :2345 /tmp/MyApp;exit
myuser@myhost:~$
which gdbserver
which gdbserver
/usr/bin/gdbserver
myuser@myhost:~$
myuser@myhost:~$
gdbserver :2345 /tmp/MyApp
gdbserver :2345 /tmp/MyApp myuser@myhost:~$ gdbserver :2345 /tmp/MyApp
Process /tmp/MyApp created; pid = 9604
Listening on port 2345
Remote debugging from host 172.20.15.8

[Updated on: Tue, 19 May 2015 19:44]

Report message to a moderator

Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1834343 is a reply to message #1695855] Sun, 08 November 2020 09:02 Go to previous messageGo to next message
Gerald Mattes is currently offline Gerald MattesFriend
Messages: 2
Registered: November 2020
Junior Member
Have you found a solution meanwhile?
I have exactly the same problem.

When I start the debugger I get the following output in the remote shell console, but nothing else happens...

gdbserver :2345 /mypath/myapp;exit
#

If I then manually enter the start command ("gdbserver :2345 /mypath/myapp") on the console prompt, the remote app starts and debugging works fine.
It seems that the start command is transmitted too early, before the shell is ready.
Sometimes (but unfortunately very rarely) it happens, that the debugger starts automatically and everything works fine.

Does anyone have any idea why this could be or whether the timing could be influenced in any way?
Re: automatic dsf remote debugging launcher won't start gdbserver on remote target [message #1835172 is a reply to message #1834343] Thu, 26 November 2020 10:26 Go to previous message
Gerald Mattes is currently offline Gerald MattesFriend
Messages: 2
Registered: November 2020
Junior Member
Does anyone have an idea how to solve this problem.
I would be very happy about any advice or tip.

Gerald
Previous Topic:C++17 and .language.settings.
Next Topic:eclipse IDE for esp8266 mingw make error
Goto Forum:
  


Current Time: Fri Apr 26 16:01:23 GMT 2024

Powered by FUDForum. Page generated in 0.04263 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top