Sometimes I encounter pointers to the middle of a structure, and the code uses a negative offset to refer to earlier code. This can result in assembly that looks like this, using MIPS as an example architecture:

lw -0x4($s0)

In IDA Pro, I can highlight the "-0x4" part of that instruction and press T to open a new dialog that allows me to set a "delta" (the feature is described fully in detail here: http://www.hexblog.com/?p=63). If I knew that $s0 pointed to the 4th byte of a structure, I could set the delta to -4 and get something like this:

lw struct.field0+4($s0)

Is there an analogous way to operate on the middle of a structure in Ghidra?

1 Answer 1


This is currently(April 2020) still not possible. The feature is discussed in https://github.com/NationalSecurityAgency/ghidra/issues/573

It is not clear if this is something that the Ghidra developers will implement in the near future or if this needs to implemented by the community.

In any case I think that when this happens this issue will be marked as resolved and reference the PR that implements the feature and thus answers the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.