Class CodeUnitCache

java.lang.Object
ghidra.program.database.DbCache<ghidra.program.database.code.CodeUnitDB>
ghidra.program.database.code.CodeUnitCache

public class CodeUnitCache extends DbCache<ghidra.program.database.code.CodeUnitDB>
Specialized version of DbCache for code units. Because the cache has to deal with both instructions and data, it is more convenient to have methods to specifically get instruction or data when the client knows which it expects.
  • Constructor Details

  • Method Details

    • getData

      public ghidra.program.database.code.DataDB getData(DBRecord dbRecord)
      Gets the Data object for the given record or null if the record is an instruction record.
      Parameters:
      dbRecord - the data or instruction record
      Returns:
      the DataDB for the record or null if the record is an instruction
    • getInstruction

      public InstructionDB getInstruction(DBRecord dbRecord)
      Gets the Instruction object for the given record or null if the record is a data record.
      Parameters:
      dbRecord - the data or instruction record
      Returns:
      the InstructionDB for the record or null if the record is a Data record