Remote Targets

There are two different forms of remote debugging, depending on which computer (remote client or server) is the host computer. The host computer is the computer on which the debugger engine is active. On the other computer, the debugger engine is merely acting as a proxy relaying commands and data to the host engine.

All debugger operations -- such as executing commands and extensions, and symbol loading -- are performed by the host engine. A debugger session is also relative to the host engine.

To list the debugging servers and process servers currently running on a computer, use OutputServers.

Debugging Servers and Debugging Clients

A debugging server is an instance of the debugger engine acting as a host and listening for connections from debugging clients. The method StartServer will tell the debugger engine to start listening for connections from debugging clients.

A debugging client is an instance of the debugger engine acting as a proxy, sending debugger commands and I/O to the debugging server. The function DebugConnect can be used to connect to the debugging server.

The client object returned by DebugConnect is not automatically joined to the debugger session on the debugging server. The method ConnectSession can be used to join the session, synchronizing input and output.

The communication between a debugging server and a debugging client mostly consists of debugger commands and RPC calls sent to the server, and command output sent back to the client.

Process Servers, Kernel Connection Servers, and Smart Clients

Process servers and kernel connection servers are both instances of the debugger engine acting as proxies, listening for connections from smart clients, and performing memory, processor, or operating system operations as requested by these remote clients. A process server facilitates the debugging of processes that are running on the same computer. A kernel connection server facilitates the debugging of a Windows kernel debugging target that is connected to the computer that is running the connection server. A process server can be started using the method StartProcessServer or the program DbgSrv. The method WaitForProcessServerEnd will wait for a process server started with StartProcessServer to end. A kernel connection server can be activated using the program KdSrv.

A smart client is an instance of the debugger engine acting as a host engine and connected to a process server. The method ConnectProcessServer will connect to a process server. Once connected, the methods described in Live User-Mode Targets can be used.

When the remote client is finished with the process server, it can disconnect using DisconnectProcessServer, or it can use EndProcessServer to request that the process server shut down. To shut down the process server from the computer that it is running on, use Task Manager to end the process. If the instance of the debugger engine that used StartProcessServer is still running, it can use Execute to issue the debugger command .endsrv 0, which will end the process server (this is an exception to the usual behavior of .endsrv, which generally does not affect process servers).

The communication between a process server and a smart client typically consists of low-level memory, processor, and operating system operations and requests that are sent from the remote client to the server. Their results are then sent back to the client.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft