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

Thanks Teo. Indeed I had been seeing the same shell-hanging behavior as was reported in this bug, when using other RSE functionality, such as listing all shell processes and seeing the connection hang. I will consider filing a new bug, but first I think I should look at our target's ssh server configuration to make sure there's nothing causing it to drop characters sent by Eclipse/RSE immediately after the ssh session is established.

Teo, in your case, was the situation resolved with patch fixing the bug you referenced, i.e. in Indigo SR1?

On Wed, May 20, 2015 at 6:25 AM, Madan Teo <teodor.madan@xxxxxxxxxxxxx> wrote:

I have encountered a similar situation with OpenSSH and dropbear servers on some embedded linux setup.


RSE opens a ssh shell channel and sends commands for shell execution e.g. “echo “ or “gdbserver ..” that are not executed. You can notice this with the fact that echo result has not been printed in the remote shell.


It seems to be a variation of but with worse condition, i.e. it is not enough for RSE ssh shell support to wait for the first character to be received before deciding that the shell channel is fully functional.





From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: Tuesday, May 19, 2015 21:27
To: CDT General developers list.
Subject: 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)


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:




Code: [Select all] [Show/ hide]


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


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




Code: [Select all] [Show/ hide]


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


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:




Code: [Select all] [Show/ hide]


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:




Code: [Select all] [Show/ hide]


<?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=""/>
<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"/>


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:




Code: [Select all] [Show/ hide]


set sysroot /opt/poky/1.7.1/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
show sysroot
show solib-search-path


Installation Details:




Code: [Select all] [Show/ hide]


Kepler Service Release 2
Build id: 20140212-2123
CollabNet Merge Client 2.2.4 CollabNet
  Eclipse CORBA Plug-in
  Eclipse IDE for C/C++ Developers       epp.package.cpp  null
    C/C++ Call Graph Visualization     Eclipse Linux Tools
    C/C++ Library API Documentation Hover Help  Eclipse Linux Tools
    ChangeLog Management Tools for C/C++  Eclipse Linux Tools
    Eclipse Platform  4.3.2.M20140206-1000      org.eclipse.platform.ide  null
    EPP CPP Feature Eclipse Packaging Project
    GCov Integration   Eclipse Linux Tools
    GDB Tracepoint Analysis     Eclipse Linux Tools
    GProf Integration        Eclipse Linux Tools
    Library Hover help for devhelp documentation  Eclipse Linux Tools
    LTTng - Linux Tracing Toolkit       Eclipse Linux Tools
    LTTng Kernel Analysis Eclipse Linux Tools
    OProfile Integration      Eclipse Linux Tools
    Perf Integration Eclipse Linux Tools
    RPM Import/Export/Building and Editing Tool Eclipse Linux Tools
    SystemTap IDE and Visualization Tools    Eclipse Linux Tools
    Valgrind Tools Integration     Eclipse Linux Tools
  JNA Library 3.2.7 null
  PyDev for Eclipse      Aptana
  Pydev Mylyn Integration      0.4.0        Fabio Zadrozny
  Subclipse (Required) 1.6.18
  Subclipse Integration for Mylyn 3.x (Optional) 3.0.0
  Subversion Client Adapter (Required)  1.6.12
  Subversion JavaHL Native Library Adapter (Required)    1.6.17
  Subversion Revision Graph    1.0.9
  SVNKit Client Adapter (Not required)  1.6.15
  SVNKit Library TMate Software



cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top