Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] automatic dsf remote debugging launcher won't start gdbserver on remote target

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


From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of Tim Black [timblaktu@xxxxxxxxx]
Sent: May 19, 2015 1:00 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] automatic dsf remote debugging launcher won't start gdbserver on remote target

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 nothing happens:

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 manually:

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


Back to the top