1

On CompactRISC CR16C architecture, because instructions only start at even-numbered addresses, code pointers (as used by JAL, JUMP, Jcond) are shifted one bit to the right. These are distinct from data pointers, which are byte-addressable and just contain the target address without any bit shifting.

Does Ghidra have any additional pointer type that can be used to distinguish between these code pointers and data pointers?

Example of how this currently looks, using the standard pointer type for both:

enter image description here

(field1 is a code pointer, with the comment indicating the address it should be, and field2 is a data pointer)

I tried creating a function definition and setting the type as a pointer to that, but it still kept pointing to the wrong address. So, alternatively, could this behaviour be a bug?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.