Interface INativeContext
- All Known Subinterfaces:
INativeCodeUnit<InsnType>
Native code context. The context is a super-interface of the
INativeCodeUnit and allows
the implementation of test disassemblers outside of the unit management facility.-
Method Summary
Modifier and TypeMethodDescriptioncreateMethodReference(String name, IPrototypeItem prototype, INativeMethodDataItem methodData) Create a method reference backed by native method data.intRetrieve the code container type.Retrieve the compiler detected for this native unit.getDynamicBranchResolution(long address) Retrieve the recorded dynamic branch resolution at an address.getField(long address) Retrieve the field starting at an address.Retrieve all known fields.longRetrieve the size of the imageRetrieve the virtual memory model.getNativeItemAt(long address) Retrieve the native continuous memory item (a variable, an instruction) starting at the provided address.getNativeItemOver(long address) Retrieve the native continuous memory item (a variable, an instruction) spanning over the provided address.IProcessor<?> Retrieve the machine code parser (pseudo-processor).getRoutine(long address) Retrieve the routine starting at an address.getRoutineByName(String name) Retrieve a routine by name.getRoutineOver(long address) Retrieve the routine containing an address.Retrieve all known routines.Retrieve the executable subsystem type.Retrieve the native type manager.longRetrieve the virtual image base.booleanrecordDynamicBranchTarget(long instructionAddress, boolean resolved, IBranchTarget target) Record a dynamic branch target.voidRequest reanalysis of a routine.voidtrackNativeItem(INativeType type, IEventListener listener) Register a listener for updates to a native type or item.
-
Method Details
-
getCodeContainerType
int getCodeContainerType()Retrieve the code container type.- Returns:
- 0=unknown, 1=ELF, 2=PE
-
getSubsystemType
SubsystemType getSubsystemType()Retrieve the executable subsystem type.- Returns:
- subsystem type, or null if unknown
-
getDetectedCompiler
ICompiler getDetectedCompiler()Retrieve the compiler detected for this native unit.- Returns:
- detected compiler descriptor
-
trackNativeItem
Register a listener for updates to a native type or item.- Parameters:
type- native type to tracklistener- event listener
-
getProcessor
IProcessor<?> getProcessor()Retrieve the machine code parser (pseudo-processor).- Returns:
- processor instance
-
getMemory
IVirtualMemory getMemory()Retrieve the virtual memory model.- Returns:
- virtual memory model
-
getTypeManager
ITypeManager getTypeManager()Retrieve the native type manager.- Returns:
- type manager
-
getVirtualImageBase
long getVirtualImageBase()Retrieve the virtual image base. This virtual address is the reference for every memory access.- Returns:
- the virtual image base
-
getImageSize
long getImageSize()Retrieve the size of the image- Returns:
- image size in bytes
-
getRoutines
List<INativeMethodItem> getRoutines()Retrieve all known routines.- Returns:
- routine list
-
getRoutine
Retrieve the routine starting at an address.- Parameters:
address- routine start address- Returns:
- routine, or null
-
getRoutineOver
Retrieve the routine containing an address.- Parameters:
address- address to test- Returns:
- containing routine, or null
-
getRoutineByName
Retrieve a routine by name.- Parameters:
name- routine name- Returns:
- matching routine, or null
-
getFields
List<INativeFieldItem> getFields()Retrieve all known fields.- Returns:
- field list
-
getField
Retrieve the field starting at an address.- Parameters:
address- field start address- Returns:
- field, or null
-
getNativeItemAt
Retrieve the native continuous memory item (a variable, an instruction) starting at the provided address.- Parameters:
address- item start address- Returns:
- native item, or null
-
getNativeItemOver
Retrieve the native continuous memory item (a variable, an instruction) spanning over the provided address.- Parameters:
address- address to test- Returns:
- native item, or null
-
createMethodReference
INativeMethodItem createMethodReference(String name, IPrototypeItem prototype, INativeMethodDataItem methodData) Create a method reference backed by native method data.- Parameters:
name- method nameprototype- method prototypemethodData- method data- Returns:
- method reference
-
getDynamicBranchResolution
Retrieve the recorded dynamic branch resolution at an address.- Parameters:
address- branch instruction address- Returns:
- branch resolution, or null
-
recordDynamicBranchTarget
Record a dynamic branch target.- Parameters:
instructionAddress- branch instruction addressresolved- true if the target was resolvedtarget- resolved target, or null- Returns:
- true if the target was recorded
-
requestRoutineReanalysis
Request reanalysis of a routine.- Parameters:
routine- routine to reanalyze
-