All the code for the OpenRISC 1000 RSP server interface can be found in debug/rsp-server.c. The interface is specified in the header file, debug/rsp-server.h.
debug/rsp-server.c
debug/rsp-server.h
The code is commented for post-processing with doxygen ([5]).