2

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?

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.