From owner-freebsd-hackers Fri Sep 1 10: 1:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from sofia.csl.sri.com (sofia.csl.sri.com [130.107.19.127]) by hub.freebsd.org (Postfix) with ESMTP id 1CDA337B43C for ; Fri, 1 Sep 2000 10:01:55 -0700 (PDT) Received: (from molter@localhost) by sofia.csl.sri.com (8.9.3/8.9.3) id KAA66115 for hackers@FreeBSD.ORG; Fri, 1 Sep 2000 10:02:41 -0700 (PDT) (envelope-from molter) From: Marco Molteni Date: Fri, 1 Sep 2000 10:02:41 -0700 To: hackers@FreeBSD.ORG Subject: Re: gdb remote debugging on slow computers Message-ID: <20000901100241.B66078@sofia.csl.sri.com> References: <200008312352.TAA03733@hda.hda.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200008312352.TAA03733@hda.hda.com>; from dufault@hda.com on Thu, Aug 31, 2000 at 07:52:43PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 31 Aug 2000, Peter Dufault wrote: [..] > I want to attach a gdb running on my FreeBSD system to something > running on that wicked slow Sun. I've built a gdb with a target > machine of "sparc-sun-solaris2.7", I've got an executable, but I > haven't found a way to run something on the Sun that I can attach > to in order to debug remote processes. All I've found are ways to > connect to remote serial ports. Does anyone know if I can easily > do this? I am not sure I understood your question. If you mean: How can I use gdb + gdbserver via a TCP connection, you do the following: hostA (gdbserver) $ gdbserver hostB:5555 prog-to-be-debugged hostB (gdb) $ gdb (gdb) target remote hostA:5555 Notes: 1. the gdb documentation, although not clearly, explains this in section 13.4.1.5 2. the gdbserver I am using DOESN'T enforce the connection to come from hostB; this means that there is a race condition that allows the first connection to hostA, port 5555 to grab the debugging section! If you are interested I have a small shared library wrapper around accept() to fix this. Marco -- Marco Molteni "rough consensus and running code" SRI International, System Design Laboratory To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message