Detailed description
In this PR we start digging into the generation of XML by the firmware and the large buffers that are required in places. This also addresses an issue with the target memory map where large and complicated maps could run the firmware out of space to build the complete map which would then result in odd failures in GDB to load the memory map.
We do this in two main steps: Making the map building reentrant with a little extra state in the target structure; Making the map building occur piecemeal so the maximum size of any one chunk of the map is small and easily fits the available buffers.
This is a tiny bit slower than the one large map method, however it does mean that the probe cannot now run out of space.
Your checklist for this pull request
Closing issues
<!-- Filling this template is mandatory -->
## Detailed description
In this PR we start digging into the generation of XML by the firmware and the large buffers that are required in places. This also addresses an issue with the target memory map where large and complicated maps could run the firmware out of space to build the complete map which would then result in odd failures in GDB to load the memory map.
We do this in two main steps: Making the map building reentrant with a little extra state in the target structure; Making the map building occur piecemeal so the maximum size of any one chunk of the map is small and easily fits the available buffers.
This is a tiny bit slower than the one large map method, however it does mean that the probe cannot now run out of space.
## Your checklist for this pull request
* [x] I've read the [Code of Conduct](https://codeberg.org/blackmagic-debug/blackmagic/src/CODE_OF_CONDUCT.md)
* [x] I've read the [guidelines for contributing](https://codeberg.org/blackmagic-debug/blackmagic/src/CONTRIBUTING.md) to this repository
* [x] It builds for hardware native (see [Building the firmware](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-the-firmware))
* [x] It builds as BMDA (see [Building the BMDA](https://codeberg.org/blackmagic-debug/blackmagic?tab=readme-ov-file#building-black-magic-debug-app))
* [x] I've tested it to the best of my ability
* [x] My commit messages provide a useful short description of what the commits do
## Closing issues
<!-- put "fixes #XXXX" here to auto-close the issue(s) that your PR fixes (if any). -->