[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] RE: remote debugging - Windows/Unix


Hi,

Martin already pointed the prerequisites of using the "C/C++ Remote
Application" Launch Configuration,

On the target:
1. A gdbserver on the remote target accessible through the PATH on the
target or as specified in the launch configuration.
2. The ability to use the port specified in the launch configuration.

On the host:
1. A cross-built gdb targeting  your target machine. (located as
specified in the launch configuration)
 

You can test out that your setup is correct by hand:
1. Log in to the target and start gdbserver on the executable to debug.
  > gdbserver :<portNO>  executable
  where <portNo> is the port number as specified in the launch
configuration.

2. On your host, launch a gdb session and establish a remote connection.
  > gdb-cross executable
  gdb-cross) target remote <ip>:<portNO>
  
  where gdb-cross is the cross-built gdb.  
  where <ip> is the ip address of your target.
  where <portNo> is the port number as specified in the launch
configuration.

If the above works than you most likely have a working configuration and
I can work with you further to track down any problems with the C/C++
Remote Application Launch Configuration.  Please make sure to try at
least of a couple of steps or other debugging actions with your gdb to
make sure that it works.

Thanks,
Ewa.

-----Original Message-----
From: Martin Oberhuber [mailto:martin.oberhuber@xxxxxxxxxxxxx] 
Sent: Friday, August 24, 2007 12:53 PM
To: Johanna
Cc: Ewa Matejska; Target Management developer discussions
Subject: Re: remote debugging - Windows/Unix

Hello Johanna,

I think you'll need to debug this.

Just put a breakpoint in
    REmoteRunLaunchDelegate.remoteShellExec()
and step through it from that point on.

Problem might be that the "gdbserver" program cannot
be started on the remote machine, because it is not
installed or not found by the PATH. Or, the default
port of gdbserver is already in use. Or, firewall
forbids connecting to the gdbserver port.

Also note that you need a local CROSS gdb! That is,
a version of gdb on Windows that's capable of
debugging Linux apps. You'll probably need to compile
such a gdb yourself, since I'm not aware of any
out-of-the-box open source cross toolkit -- some
commercial vendors provide it though. See also
http://dev.eclipse.org/mhonarc/lists/dsdp-tm-dev/msg00831.html

I'd recommend setting up the remote debug scenario
Linux X Linux first, then you don't need the cross
gdb. You can also set it up by hand once:
   * Log in to remote box
   * launch gdbserver manually on the remote
   * launch gdb <programname>

For a great summary of Eclipse / CDT remote development, see
http://dev.eclipse.org/mhonarc/lists/dsdp-tm-dev/msg01369.html

It has some good pointers, especially this one for a different
setup where the gdb exectuable itself runs on the remote:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=30094#c13

Yet a different approach might be possible through the
gdb implementation of the Eclipse Device Debugging Project,
http://wiki.eclipse.org/DSDP/DD/GDB

Thanks,
--
Martin Oberhuber
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm


Johanna wrote:
> sorry, we meant "C/C++ remote application" and not "remote connection"
> 
> //Johanna
>