Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Detailed description
Back in v1.8.2 we introduced fake threads support to allow modern GDBs to work with the project. As part of that we had to report to GDB that there's always and forever one thread to match the 1 core no OS reality of debugging bare-metal. Unfortunately a consequence of that was that IDEs that don't properly gate checking for threads against being presently attached to a target would then ask, after detaching, if there were any threads, get told yes, and then go sulk due to their impaired logic.
This PR addresses this by gating our telling GDB there are threads, behind being attached to a target. This means we report an empty thread list when detached, preventing the logic issue in those IDEs. It technically also means we're being more correct in our handling of the request which is why we've marked it as a bug in BMD, but it is papering over a bug in particularly Eclipse-based IDEs like STM32CubeIDE, Eclipse Embedded CDT and AT32IDE.
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues