-
-
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: ADI structural cleanup and ARMv8-M debug improvements #2010
Conversation
… component lookup mechanism
…little and reduce indentation
… only ever uses 4 bits
…me defines for the magic numbers involved and comments
…ttach()` so we can be sure we actually halted the core before doing things that require it to be halted
… are actually enabled, checking which are when the core halts
…breakwatch_set()` works
…fixed a type issue
…om `cortexm_breakwatch_set()`
…om `cortexm_breakwatch_set()`
…M bits and define what all the bits actually do with comments
…egister read handler
… with it having to guess which thread we're reporting for, causing some funky behaviour
… functions for helping nagivate target debugging issues in the future
75013cf
to
deeece3
Compare
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
Hey, I've tried it with my M55 dual core board, where I can still scan/attach/load fine. The first time I interrupt after continuing I get this print
and any LMK if you want to discuss this here or elsewhere |
Please can you open an issue about this? What you're seeing suggests that we've advertised something to GDB in the target.xml that then fails to line up with what we send GDB in the all registers read packaet. To debug that we're going to need a trace from BMDA at BMDA should be dynamically handling whether to deal with a FPU or not and whether the caches are enabled or not, but it's entirely possible this M55 core implements something we're not yet properly dealing with on account of not having seen it in the wild yet. |
Thanks @dragonmux, I've opened #2018 with as much information as I could find |
Detailed description
In this PR we address some structural clean-up that is needed in the wake of all the ADIv6 work and some issues in Cortex-M debug of ARMv8-M targets.
This has wound up touching the ADI, Cortex-M, target and GDB layers so apologies that this PR is a little all over the place. With this however, we now have proper diagnostics on what GDB is asking us to do vs what we're doing in regards to
step
/next
/stepi
/continue
/run
/etc and ARMv8-M debug works properly. Tested on a Cortex-M33 and Cortex-M4 (to ensure we didn't break ARMv7-M debug in the process).This solves what we could reproduce of the final issue raised in #1970. Any further issues in relation to ARMv8-M debug are likely to do with S vs NS modes and what debug is allowed per the DHCSR.
The GDB changes fix GDB trying to guess which "thread" (core) halted when we report halt events back to it, making the output from
set debug remote on
go fromto
As far as we can tell this is a fully backwards compatible change, but the GDB documentation does not make this easy to determine.
Your checklist for this pull request
Closing issues