Description
gdbstub
already implements protocol-level multiprocess extensions "under-the-hood", and simply hard-codes a fake PID in single/multi-threaded mode (much the same way it hard-codes a fake TID in single-threaded mode).
Adding true multiprocess debugging will most likely involve adding a new target::ext::base::multiprocess
API set, along with doing the requisite plumbing to track and report the current PID.
In addition, we'd want to add a new in-tree armv4t_multiprocess
example, which wouldn't actually spin up multiple processes, but would instead spin up multiple multi-core armv4t
emulator instances, just so there's an in-tree example of this stuff working.
Why API-breaking? Unfortunately, I neglected to mark the BaseOps
enum as non_exhaustive
, which means implementing this will be a breaking change. Aside from that, this likely could've been entirely non-breaking...