Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: threads-induced IDE hangups #1560

Merged
merged 2 commits into from
Jul 23, 2023
Merged

Conversation

dragonmux
Copy link
Member

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

  • 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

Closing issues

@dragonmux dragonmux added Bug Confirmed bug GDB Issue/PR related to GDB Regression Bug caused by a regression labels Jul 22, 2023
@dragonmux dragonmux added this to the v1.10 milestone Jul 22, 2023
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esden esden merged commit 2cc1b94 into main Jul 23, 2023
6 checks passed
@dragonmux dragonmux deleted the fix/threads-induced-ide-hangups branch July 23, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug GDB Issue/PR related to GDB Regression Bug caused by a regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants