Is there a way to access the call string of a CALLOTHER Pcode instruction when iterating over the Pcode in Java? The listing below shows an example of what I mean:

                             LAB_0001b034                                    XREF[1]:     0001b024(j)  
        0001b034 36 7f ff e6     rbit       r7,r6
                                                      r7 = CALLOTHER "ReverseBitOrder", r6

In this example, I'd like to get the string "ReverseBitOrder".
Unfortunately, there is no hint in the instruction info except for this input object:


Which does not translate into the given string and I also cannot click on the string to find a location in memory. I also looked through the API docs of Pcode, Instruction etc., but did not find anything useful.

  • If this is about Ghidra and not generic Java, say so and add proper tags.
    – Igor Skochinsky
    Commented Oct 8, 2020 at 18:39

1 Answer 1


There is a ghidra_script that current does this, see https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Features/Base/ghidra_scripts/MarkCallOtherPcode.java


op = getInstructionAt(toAddr(0x1b034)).getPcode()[0]
  • Thanks a lot! That's what I needed.
    – Melvin
    Commented Oct 6, 2020 at 16:57

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.