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


By the time of writing (April 2020), this is 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 be 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 you have read our privacy policy.

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