Detailed description
This is a rewrite of the main loop as suggested in https://github.com/blackmagic-debug/blackmagic/pull/1281. Rather
than constantly sitting inside gdb_main(), the program's main loop does its own polling of the target. This enables
a host to do its own waiting without needing to insert hooks in various functions.
This prevents WDT triggers on ESP32 where RTT blocks the IDLE thread from running. The IDLE thread is responsible for resetting the WDT. It can also be used inside the main loop to regulate hosts such as PC_HOSTED where constant USB polling is undesirable.
Your checklist for this pull request
- I've read the Code of Conduct
- I've read the guidelines for contributing to this repository
- It builds for hardware native (
make PROBE_HOST=native) - It builds as BMDA (
make PROBE_HOST=hosted) - I've tested it to the best of my ability
- My commit messages provide a useful short description of what the commits do