Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Koning <pkoning@equallogic.com>
To: eliz@gnu.org
Cc: schwab@suse.de,     polomora@gmail.com,     gdb@sources.redhat.com
Subject: Re: Debugging remotely via ssh login
Date: Fri, 22 Dec 2006 17:53:00 -0000	[thread overview]
Message-ID: <17804.6894.296000.147452@gargle.gargle.HOWL> (raw)
In-Reply-To: <ud56cmcni.fsf@gnu.org>

>>>>> "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


  reply	other threads:[~2006-12-22 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-22  7:08 ppmoore
2006-12-22 10:24 ` Andreas Schwab
2006-12-22 10:46   ` Eli Zaretskii
2006-12-22 17:53     ` Paul Koning [this message]
2006-12-25 20:09 ` Hadron
2006-12-26  0:47   ` ppmoore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17804.6894.296000.147452@gargle.gargle.HOWL \
    --to=pkoning@equallogic.com \
    --cc=eliz@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=polomora@gmail.com \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox