-
-
Notifications
You must be signed in to change notification settings - Fork 733
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
Add ARM Cortex-M support #651
Conversation
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.
With the fixes suggested in my comments and after run python set_arch('ARM-M')
, this patch works.
This might be where the name of the register is defined for the BMP implementation of the gdbserver: https://github.com/blacksphere/blackmagic/blob/87acd99fe4c3b75df1423279c6902d1709202a06/src/target/cortexm.c#L151 |
This looks good. "Good enough", though I wish we could more elegantly handle both detection and the _PSR register. We should probably document this somewhere. @hugsy do you think we should just mention this |
That's a good idea. Maybe expose it in the API documentation ("Extending GEF"). |
When trying this branch, somehowthe context display got messed up? The following settings are needed, so a context is even displayed: .gef.rc
Also the colors are gone, when using tmux-setup |
Due to the recent changes from #779, this new arch can be integrated as part of @register_architecture
class ARM_M(ARM):
aliases = ("ARM-M",)
[... rest of the class...] Cheers |
Closing since hugsy/gef-extras#45 is merged |
Add ARM Cortex-M support
Description/Motivation/Screenshots
Add a
ARM-M
architecture as outlined in #571.I used
ARM-M
instead ofmARM
as the later was turned into uppercase which makes it hard to see the relation toARM
.There is probably a way to auto detect the arch and don't relay on
python set_arch('ARM-M')
, but I'm not into the gef code base.This is more or less my workaround and in the "works for me"-state. I'm happy to help test further improvements, but I don't want to spend to much time polishing this.
How Has This Been Tested?
make tests
Checklist
dev
branch, notmaster
.