Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Launching gdb on remote host
Launching gdb on remote host [message #84458] Mon, 27 October 2003 16:15 Go to next message
Eclipse UserFriend
Originally posted by: tclement.apcc.com

How can I launch a gdb session on remote target and debug locally
(&visually)using CDT Debug?

On the command line, I can type:
ssh -l user 159.215.65.209 gdb /home/user/hello/hello.elf

This opens a secure shell and launches gdb with my program.
At this point, gdb's output stream should be identical to one launched
locally,
but I can't get the CDT Debug UI to work this way.

DETAILS:
I am cross-compiling from a Win2K, Cygwin ix86-target GNU toolchain.
The target (NetBSD 1.6ZD on a i686) does not support GDB Server 5.3
or greater(yet), so I am trying to work-around by launching gdb locally,
and debugging remotely.

Ted

Theodore Clement
Staff Firmware Engineer
AEG Research & Development
American Power Conversion
132 Fairgrounds Road
W. Kingston, RI 02892
Re: Launching gdb on remote host [message #84471 is a reply to message #84458] Mon, 27 October 2003 16:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

You should start gdb with '-i mi1' to activate the mi interface.

"Ted Clement" <tclement@apcc.com> wrote in message
news:bnk1u3$718$1@eclipse.org...
> How can I launch a gdb session on remote target and debug locally
> (&visually)using CDT Debug?
>
> On the command line, I can type:
> ssh -l user 159.215.65.209 gdb /home/user/hello/hello.elf
>
> This opens a secure shell and launches gdb with my program.
> At this point, gdb's output stream should be identical to one launched
> locally,
> but I can't get the CDT Debug UI to work this way.
>
> DETAILS:
> I am cross-compiling from a Win2K, Cygwin ix86-target GNU toolchain.
> The target (NetBSD 1.6ZD on a i686) does not support GDB Server 5.3
> or greater(yet), so I am trying to work-around by launching gdb locally,
> and debugging remotely.
>
> Ted
>
> Theodore Clement
> Staff Firmware Engineer
> AEG Research & Development
> American Power Conversion
> 132 Fairgrounds Road
> W. Kingston, RI 02892
>
>
>
>
Re: Launching gdb on remote host [message #84484 is a reply to message #84471] Mon, 27 October 2003 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tclement.apcc.com

>Mikhail Khodjaiants wrote:

> You should start gdb with '-i mi1' to activate the mi interface.

How do you get the CDT Debug UI to do this?
The Run->Debug...->Debug->GDB Debugger: wants a program name without
parameters.
I can put the ssh command in the GBD Command File: textbox, but I still
need a program name for the firts box.

To reiterate: I want GDB to run on the TARGET not the HOST.

Ted

Theodore Clement
Staff Firmware Engineer
AEG Research & Development
American Power Conversion
132 Fairgrounds Road
W. Kingston, RI 02892
Re: Launching gdb on remote host [message #84495 is a reply to message #84484] Mon, 27 October 2003 17:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikhailk.qnx.com

I understand the problem. Put 'ssh -l user 159.215.65.209 gdb' in the 'GDB
Debugger' field. The CDT will add all parameters. I am not sure that this
will work but give it a try.
But first try to run 'gdb -i mi1' on your target to see if the needed
version mi is supported.

"Ted Clement" <tclement@apcc.com> wrote in message
news:bnk3ii$8mv$1@eclipse.org...
> >Mikhail Khodjaiants wrote:
>
> > You should start gdb with '-i mi1' to activate the mi interface.
>
> How do you get the CDT Debug UI to do this?
> The Run->Debug...->Debug->GDB Debugger: wants a program name without
> parameters.
> I can put the ssh command in the GBD Command File: textbox, but I still
> need a program name for the firts box.
>
> To reiterate: I want GDB to run on the TARGET not the HOST.
>
> Ted
>
> Theodore Clement
> Staff Firmware Engineer
> AEG Research & Development
> American Power Conversion
> 132 Fairgrounds Road
> W. Kingston, RI 02892
>
Re: Launching gdb on remote host [message #84704 is a reply to message #84495] Tue, 28 October 2003 10:40 Go to previous message
Eclipse UserFriend
Originally posted by: tclement.apcc.com

>Mikhail Khodjaiants wrote:

> But first try to run 'gdb -i mi1' on your target
I am able to run 'gdb -i mi1' on the target.
(gdb version is 5.3)

> Put 'ssh -l user 159.215.65.209 gdb' in the 'GDB
> Debugger' field. The CDT will add all parameters. I am not sure that this
> will work but give it a try.
I tried this statement in the GDB Debugger, Cygwin GDB Debugger and GDB
Server
fields, double-quoted, single-quoted and not quoted.
Each time, I get this error: "Failed Launching CDI Debugger: Error
creating session: Exec error:Launching failed"

DETAILS:
I am using Eclipse 2.1.1 with CDT 1.2.0 (on Windows 2000 host) and trying
to connect to a NetBSD 1.6ZD (ix86) target running gdb 5.3.

I also tried putting the line 'ssh -l user 159.215.65.209 gdb
myprogramname' in a DOS batch file (remote.bat) and using
"c:\winnt\system32\cmd.exe \C" in the GDB Debugger: field, and
"remote.bat" in the GDB Command File: field.
The CDT Debugger gives me the "Failed Launching CDI Debugger: Error
creating session: Exec error:Launching failed" error. The remote.bat file
executes correctly on the command line.

Ted

Theodore Clement
Staff Firmware Engineer
AEG Research & Development
American Power Conversion
132 Fairgrounds Road
W. Kingston, RI 02892
Previous Topic:CDT 1.2 and flashing outline
Next Topic:can you help me,my alain
Goto Forum:
  


Current Time: Tue May 06 19:23:50 EDT 2025

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

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

Back to the top