Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Sep 2000 10:02:41 -0700
From:      Marco Molteni <molter@sofia.csl.sri.com>
To:        hackers@FreeBSD.ORG
Subject:   Re: gdb remote debugging on slow computers
Message-ID:  <20000901100241.B66078@sofia.csl.sri.com>
In-Reply-To: <200008312352.TAA03733@hda.hda.com>; from dufault@hda.com on Thu, Aug 31, 2000 at 07:52:43PM -0400
References:  <200008312352.TAA03733@hda.hda.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000901100241.B66078>