The GDB Stub The simplest approach is using a GDB stub It can use TCP or UDP or a serial port You find a working one in the hsw2020 repository It costed 4 hours studying and 6 hours coding. You need a way to interrupt your processor So your channel must be interrupt-driven (I used UART) You need to save all of your status (we do not, currently) We do not need all registers for scheduling, so we don't save them And you need a way to read and write memory The debugger examines code and data (code is read-only)