The goal of this page is to gather pointers to help new developers learn how and where GDB's Remote Serial Protocol (RSP) is implemented. For a detailed description of the protocol itself, the user manual is more relevant.
On the host side, the remote protocol is implemented as a target that implements the target_ops interface, just like native targets. For a native target, the to_insert_breakpoint method would do whatever is needed to insert a breakpoint in the current inferior, at the specified location. In the case of the remote target, to_insert_breakpoint sends a message to the gdbserver/stub and waits for the acknowledgement.
When you need to send a ptid in an RSP message, don't write it "by hand". use the write_ptid and read_ptid functions (available both in gdb and gdbserver). This way they are written in a consistent manner.
Ideas for this page: * Feature support discovery * ...