To start an EE under gdb, use the G=host:port option with the Anetd LOAD command. Here host is the name of the client host and port is an available TCP port on the target node. This will cause Anetd to start the EE under a variant of gdb called gdbserver. Gdbserver will listen for a TCP connection to the specified port. The developer can then execute gdb and issue the command 'target node:port' inside gdb to cause it to open the specified TCP connection to the gdbserver instance on the target node. Debugging can proceed as if the EE were local to the client node. Note that these procedures require the source code only on the EE developer's client node.
The host portion is currently ignored by gdbserver. That is, gdbserver will not check whether the client IP address is allowed. For now, host is just a dummy parameter. However, to avoid introducing a security hole, the server needs to make sure that remote gdb debugging permission is given only to the client who issued the LOAD command that started the EE. To avoid changing gdbserver source code, we added a shared library wrapper around the accept system call, which checks whether the remote IP address matches. If so, the connection is allowed; otherwise it is dropped.
[berry]% ad.solaris -g [apple]% sc.solaris berry:3322 LOAD X=http://sequoia.csl.sri.com:7000/test/server T=52 S=hosts G=apple:4000