Class CodeUnitCache
java.lang.Object
ghidra.program.database.DbCache<ghidra.program.database.code.CodeUnitDB>
ghidra.program.database.code.CodeUnitCache
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.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCodeUnitCache(CodeManager.CodeUnitFactory factory, Lock lock, int hardCacheSize) -
Method Summary
Modifier and TypeMethodDescriptionghidra.program.database.code.DataDBGets the Data object for the given record or null if the record is an instruction record.getInstruction(DBRecord dbRecord) Gets the Instruction object for the given record or null if the record is a data record.Methods inherited from class DbCache
add, delete, delete, getCachedInstance, getCachedInstance, getCachedObjects, getIfValid, getModificationCount, getRaw, invalidate, keyChanged, size
-
Constructor Details
-
CodeUnitCache
-
-
Method Details
-
getData
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
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
-