couple fixes for POSTMORTEM_DEBUGGING - #26374
Merged
thinkyhead merged 3 commits intoNov 1, 2023
Merged
Conversation
thinkyhead
force-pushed
the
fix-upstream/arm-postmortem
branch
from
November 1, 2023 00:07
742ed7f to
e72a8a6
Compare
thinkyhead
force-pushed
the
fix-upstream/arm-postmortem
branch
from
November 1, 2023 00:07
e72a8a6 to
29a0181
Compare
Member
|
Thanks for the patch! It's hard to find complete examples of the "right" way to do this kind of thing. |
eoyilmaz
pushed a commit
to eoyilmaz/Marlin
that referenced
this pull request
Nov 21, 2023
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR fixes two issues i've noticed while working on
POSTMORTEM_DEBUGGINGfor HC32. I believe that these issues affect other ARM Cortex Mx boards as well, thus this PR.In some circumstances, the
UnwTabGetFunctionNamewould return a pointer pointing outside of the valid memory range, causing a fault when trying to print the function name inUnwReportOut. This PR adds a check to verify that the address calculated for the function name pointer is actually readable.While the common fault handler (
CommonHandler_C) does capture the CFSR register, the captured value is cleared when notfaulted_from_exception. I cannot see why this would be needed or useful, as all it does is hide details on the cause of the fault (e.g. divide by zero, ...).Requirements
POSTMORTEM_DEBUGGINGenabledBenefits
POSTMOTEM_DEBUGGINGConfigurations
nothing special needed in configs