Re: porting gdbserver
Luis Machado via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 10/15/20 1:34 PM, William Tambe via Gdb wrote: > Is there an easy to follow documentation or commit that shows how to port > gdbserver for baremetal ? > I'm afraid there isn't. I suppose you are talking about actually coming up with a debugging stub that implements the most minimal set of remote protocol packets, right? Not "gdbserver" itself, which is always OS-hosted. From the documentation here... https://sourceware.org/gdb/onlinedocs/gdb/Overview.html#Overview ... it says: "At a minimum, a stub is required to support the ‘?’ command to tell GDB the reason for halting, ‘g’ and ‘G’ commands for register access, and the ‘m’ and ‘M’ commands for memory access. Stubs that only control single-threaded targets can implement run control with the ‘c’ (continue) command, and if the target architecture supports hardware-assisted single-stepping, the ‘s’ (step) command. Stubs that support multi-threading targets should support the ‘vCont’ command. All other commands are optional." But the above may be stale at this point.