From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21260 invoked by alias); 22 Dec 2006 17:53:44 -0000 Received: (qmail 21245 invoked by uid 22791); 22 Dec 2006 17:53:42 -0000 X-Spam-Check-By: sourceware.org Received: from exprod8og53.obsmtp.com (HELO exprod8og53.obsmtp.com) (64.18.3.88) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 22 Dec 2006 17:53:23 +0000 Received: from source ([12.110.134.31]) by exprod8ob53.obsmtp.com ([64.18.7.12]) with SMTP; Fri, 22 Dec 2006 09:46:49 PST Received: from PKONING.equallogic.com ([172.16.1.236]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 22 Dec 2006 12:50:37 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17804.6894.296000.147452@gargle.gargle.HOWL> Date: Fri, 22 Dec 2006 17:53:00 -0000 From: Paul Koning To: eliz@gnu.org Cc: schwab@suse.de, polomora@gmail.com, gdb@sources.redhat.com Subject: Re: Debugging remotely via ssh login References: <8020020.post@talk.nabble.com> X-Mailer: VM 7.07 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00189.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: >> From: Andreas Schwab Cc: gdb@sources.redhat.com >> Date: Fri, 22 Dec 2006 11:24:18 +0100 >> >> ppmoore 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 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