Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Debugging remotely via ssh login
@ 2006-12-22  7:08 ppmoore
  2006-12-22 10:24 ` Andreas Schwab
  2006-12-25 20:09 ` Hadron
  0 siblings, 2 replies; 6+ messages in thread
From: ppmoore @ 2006-12-22  7:08 UTC (permalink / raw)
  To: gdb


Hello, I wonder if anyone can help with with this one.

In our environment, we test by copying our executables to a destination
machine on our test network using scp, copy the set of source code files
that we are debugging to the same destination, and then log on to the remote
node using ssh to perform the debugging session.

I was reading in the manual about remote debugging, but the scenarios
described included debugging via a serial comm line or via a tcp port on the
remote machine. Is it possible to debug where the only access is remote
logon using ssh?

Many thanks,
Paul
-- 
View this message in context: http://www.nabble.com/Debugging-remotely-via-ssh-login-tf2869437.html#a8020020
Sent from the gdb - General mailing list archive at Nabble.com.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging remotely via ssh login
  2006-12-22  7:08 Debugging remotely via ssh login ppmoore
@ 2006-12-22 10:24 ` Andreas Schwab
  2006-12-22 10:46   ` Eli Zaretskii
  2006-12-25 20:09 ` Hadron
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2006-12-22 10:24 UTC (permalink / raw)
  To: ppmoore; +Cc: gdb

ppmoore <polomora@gmail.com> writes:

> I was reading in the manual about remote debugging, but the scenarios
> described included debugging via a serial comm line or via a tcp port on the
> remote machine. Is it possible to debug where the only access is remote
> logon using ssh?

You can forward a port via the ssh connection to the remote host, and then
use this port for the debugging session.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging remotely via ssh login
  2006-12-22 10:24 ` Andreas Schwab
@ 2006-12-22 10:46   ` Eli Zaretskii
  2006-12-22 17:53     ` Paul Koning
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2006-12-22 10:46 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: polomora, gdb

> From: Andreas Schwab <schwab@suse.de>
> Cc: gdb@sources.redhat.com
> Date: Fri, 22 Dec 2006 11:24:18 +0100
> 
> ppmoore <polomora@gmail.com> writes:
> 
> > I was reading in the manual about remote debugging, but the scenarios
> > described included debugging via a serial comm line or via a tcp port on the
> > remote machine. Is it possible to debug where the only access is remote
> > logon using ssh?
> 
> You can forward a port via the ssh connection to the remote host, and then
> use this port for the debugging session.

If someone describes this scenario in enough detail (a bit more than
the above single sentence), I'd more than happy to add it to the
manual.

TIA


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging remotely via ssh login
  2006-12-22 10:46   ` Eli Zaretskii
@ 2006-12-22 17:53     ` Paul Koning
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Koning @ 2006-12-22 17:53 UTC (permalink / raw)
  To: eliz; +Cc: schwab, polomora, gdb

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

 >> From: Andreas Schwab <schwab@suse.de> Cc: gdb@sources.redhat.com
 >> Date: Fri, 22 Dec 2006 11:24:18 +0100
 >> 
 >> ppmoore <polomora@gmail.com> writes:
 >> 
 >> > I was reading in the manual about remote debugging, but the
 >> scenarios > described included debugging via a serial comm line or
 >> via a tcp port on the > remote machine. Is it possible to debug
 >> where the only access is remote > logon using ssh?
 >> 
 >> You can forward a port via the ssh connection to the remote host,
 >> and then use this port for the debugging session.

 Eli> If someone describes this scenario in enough detail (a bit more
 Eli> than the above single sentence), I'd more than happy to add it
 Eli> to the manual.

Something like this:

On the target system:
$ gdbserver localhost:6666 prog args

On the host:
$ ssh -L 6666:target:6666
<log in>

then in another shell:
gdb prog
(gdb) target remote localhost:6666

The same approach works if the target debug is done via something
other than gdbserver, so long as it listens on a TCP port that is
willing to accept local (to the target) connections.

You can avoid the interaction in the ssh invocation by suitable
switches and authenticating mechanism; see the manpage for details.
But the above is the basic approach.

    paul


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging remotely via ssh login
  2006-12-22  7:08 Debugging remotely via ssh login ppmoore
  2006-12-22 10:24 ` Andreas Schwab
@ 2006-12-25 20:09 ` Hadron
  2006-12-26  0:47   ` ppmoore
  1 sibling, 1 reply; 6+ messages in thread
From: Hadron @ 2006-12-25 20:09 UTC (permalink / raw)
  To: gdb


Cant you just create a secure shell and run gdb.

You might find this interesting as I was looking into this recently.

http://www.cucy.net/lacp/archives/000024.html




ppmoore wrote:
> 
> Hello, I wonder if anyone can help with with this one.
> 
> In our environment, we test by copying our executables to a destination
> machine on our test network using scp, copy the set of source code files
> that we are debugging to the same destination, and then log on to the
> remote node using ssh to perform the debugging session.
> 
> I was reading in the manual about remote debugging, but the scenarios
> described included debugging via a serial comm line or via a tcp port on
> the remote machine. Is it possible to debug where the only access is
> remote logon using ssh?
> 
> Many thanks,
> Paul
> 

-- 
View this message in context: http://www.nabble.com/Debugging-remotely-via-ssh-login-tf2869437.html#a8048624
Sent from the gdb - General mailing list archive at Nabble.com.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging remotely via ssh login
  2006-12-25 20:09 ` Hadron
@ 2006-12-26  0:47   ` ppmoore
  0 siblings, 0 replies; 6+ messages in thread
From: ppmoore @ 2006-12-26  0:47 UTC (permalink / raw)
  To: gdb


Thanks Hadron.

I found this also, from a colleague at work, after I had posted.

Regards,
Paul



Hadron wrote:
> 
> Cant you just create a secure shell and run gdb.
> 
> You might find this interesting as I was looking into this recently.
> 
> http://www.cucy.net/lacp/archives/000024.html
> 
> 
> 
> 
> ppmoore wrote:
>> 
>> Hello, I wonder if anyone can help with with this one.
>> 
>> In our environment, we test by copying our executables to a destination
>> machine on our test network using scp, copy the set of source code files
>> that we are debugging to the same destination, and then log on to the
>> remote node using ssh to perform the debugging session.
>> 
>> I was reading in the manual about remote debugging, but the scenarios
>> described included debugging via a serial comm line or via a tcp port on
>> the remote machine. Is it possible to debug where the only access is
>> remote logon using ssh?
>> 
>> Many thanks,
>> Paul
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Debugging-remotely-via-ssh-login-tf2869437.html#a8050087
Sent from the gdb - General mailing list archive at Nabble.com.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-26  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22  7:08 Debugging remotely via ssh login ppmoore
2006-12-22 10:24 ` Andreas Schwab
2006-12-22 10:46   ` Eli Zaretskii
2006-12-22 17:53     ` Paul Koning
2006-12-25 20:09 ` Hadron
2006-12-26  0:47   ` ppmoore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox