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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message