-
-
Notifications
You must be signed in to change notification settings - Fork 781
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: Semihosting #1432
Fix: Semihosting #1432
Conversation
…o a hidden UB declaration of gdb_main_loop()
@koendv Please give this a test when you find a minute. It should have solved the bug you reported back in February. We are unfortunately ill-equipped with suitable firmware, etc, to actually test this ourself so please let us know how you get on and if this PR needs to go further. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ok. My impression is it doesn't quite work. I'd like a second opinion on this one. |
I would suggest adding to the documentation:
If using black magic debug app with black magic debug, make sure both
have the same major release.
(e.g. not app 1.9 with firmware 1.8)
|
Using a newer BMDA with older firmware should work (there are fallbacks in BMDA for this) - if it doesn't, please let us know as that's a bug. Do note that v1.8 firmware with BMDA from main will fall back right now to the low-level JTAG/SWD remote functions as the protocol rewrite done in #1389 did not extend to providing a complete set of backwards compatible remote protocol functions for firmware with remote protocol versions 1 and 2, so that may be part of where the slowness you were experiencing is coming from |
Detailed description
In the wake of #1284, Koen correctly identified that a private (UB) declaration of gdb_main_loop() had the semihosting Host IO code broken with nobody having noticed. This PR addresses this by removing that declaration, putting one in the gdb_main.h header so mismatches with gdb_main.c result in compilation failure, and updating how the Host IO code calls the main loop.
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues
Fixes #1385