Skip to content
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

Supporting Bit Packing #12

Open
marsfan opened this issue May 17, 2021 · 1 comment
Open

Supporting Bit Packing #12

marsfan opened this issue May 17, 2021 · 1 comment

Comments

@marsfan
Copy link

marsfan commented May 17, 2021

Ghidra supports bit packed bytes for structs. This can allow labeling of the individual bits in the register. Since SVD files already contain this info, this can be used to add additional detail to the register mapping when disassembling, reducing need to reference a datasheet.

I would be happy to implement this myself, but I will not be able to for a couple of weeks. I wanted to add this as a report so that I have a personal reminder of it.

Edit: Here is an example of a bit packed struct for the USB_CNTR register on the STM32L100R8

image

@redfast00
Copy link

@marsfan I would be very interested in this feature, but I'm a bit discouraged by NationalSecurityAgency/ghidra#647: since the decompiler can't handle bitfields yet, will adding this be useful for reverse engineers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants