-
Notifications
You must be signed in to change notification settings - Fork 3k
mbed fault handler: fix mbed_fault_context parameter #11272
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
Conversation
…fault_context in mbed_fault_handler.
Can you rework the commit message, shall be something like: |
If you're going to change this, it's a behaviour change, so you should at least change the parameter to be This isn't public API anyway, I believe, and it doesn't currently use that parameter, so I'd be inclined to just stop passing that parameter at all - save an instruction. While here, remove the unnecessary cast at
Is there a reason this change is happening? |
I was making stack dump feature for my customers and found that parameter was returning misleading information. It took me quite sometime to figure out the right values. I agree with |
@andrewc-arm, thank you for your changes. |
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.
Looks fine to me, but it is an API change, so not sure it would be appropriate for a patch release. But I don't feel that strongly.
@andrewc-arm Lets take it to 5.14. If this is API change, should be "functional change" in PR type above and contain "release notes" details as well. |
Sure. Thanks for making better software. |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Why required
Without this fix, when
void mbed_fault_handler(uint32_t fault_type, void *mbed_fault_context_in)
is called,mbed_fault_context_in
is in**mbed_fault_context_t
type which is unnecessarily doubly pointered. Also, it's unintuitive, most users will expect to simply static cast the void pointer argument to*mbed_fault_context_t
instead of**mbed_fault_context_t
.What's the change
The
except.S
Fault_Handler assembly code will preparembed_fault_context_in
argument as*mbed_fault_context_t
type instead of**mbed_fault_context_t
type.Pull request type
Reviewers
Release Notes