The RSP packet exchanges to implement the GDB target extended-remote command are shown as a sequence diagram in Figure 3.9.
The dialog is almost identical to that for standard remote debugging (see Section 3.2.1). The difference is the penultimate ! packet, notifying the target that this is an extended remote connection.
Through this exchange, the GDB client shows the following output:
(gdb) target extended-remote :51000 Remote debugging using :51000 0x00000100 in _start () (gdb)