| com.pnfsoftware.jeb.core.units.code.asm.analyzer.INativeCodeAnalyzer<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction> |
Definition of a code analyzer. Typically, a code analyzer is instantiated by a code unit. Clients
should not attempt to create such objects. There exists one implementation of this object,
provided to clients by the INativeCodeUnit. This reference implementation supports
partial concurrency: the analyze() method may be called by concurrent threads.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
analyze()
Start an analysis pass.
| ||||||||||
| abstract boolean | clearAnalysisQueue() | ||||||||||
| abstract boolean | enqueuePointerForAnalysis(PointerDescription pointer, int permission) | ||||||||||
| abstract boolean |
enqueuePointerForAnalysis(PointerDescription pointer)
Register a pointer (code or data) for a
gentle analysis. | ||||||||||
| abstract boolean |
enqueuePointerForAnalysis(PointerDescription pointer, int permission, boolean noRoutine)
Register a pointer (code or data) for analysis.
| ||||||||||
| abstract INativeCodeAdvancedAnalyzer<InsnType> |
getAdvancedAnalyzer()
Retrieve a reference to the optional advanced analyzer object.
| ||||||||||
| abstract MemoryRanges |
getAnalysisRanges()
Retrieve a reference to the memory ranges that the analyzer works on.
| ||||||||||
| abstract INativeCodeAnalyzerExtension<InsnType> |
getAnalyzerExtensionsManager()
Retrieve a reference to the analyzer extensions manager.
| ||||||||||
| abstract IVirtualMemory |
getMemory()
Retrieve a reference to the virtual memory.
| ||||||||||
| abstract INativeCodeModel<InsnType> |
getModel()
Get the memory model managed by this analyzer.
| ||||||||||
| abstract IProcessor<InsnType> |
getProcessor()
Retrieve a reference to the machine code processor.
| ||||||||||
| abstract ITypeManager |
getTypeManager()
Get a reference to the type manager.
| ||||||||||
| abstract boolean |
isAnalyzing()
Determine if an analysis is already taking place, possibly in another thread.
| ||||||||||
| abstract boolean |
needsAnalysis()
Determine if an analysis pass is required.
| ||||||||||
| abstract boolean |
recordDynamicBranchTarget(long instructionAddress, boolean resolved, IBranchTarget target, boolean prepareAnalysis)
Record branch resolutions for dynamic callsites.
| ||||||||||
| abstract boolean | recordDynamicRegisterValue(long instructionAddress, boolean postExec, int register, long value) | ||||||||||
Start an analysis pass. Analyze the entry points that were previously registered, create new routines and data items, etc.
Register a pointer (code or data) for a
gentle analysis.
| pointer | code or data pointer; code pointers must be of type
IEntryPointDescription |
|---|
Register a pointer (code or data) for analysis.
| pointer | code or data pointer; code pointers must be of type
IEntryPointDescription |
|---|---|
| permission | analysis permission type: - 0=gentle - 1=forceful (overlapping instruction or data items if necessary) - 2=dirty (same as 1 + will undefine the existing routine if one is already defined at the pointed address) |
| noRoutine | if true, no routine will be created (if one were to be) |
Retrieve a reference to the optional advanced analyzer object.
Retrieve a reference to the memory ranges that the analyzer works on.
Retrieve a reference to the analyzer extensions manager. It manages extensions with architecture-specific or compiler-specific analysis routines.
Get the memory model managed by this analyzer.
Retrieve a reference to the machine code processor.
Determine if an analysis is already taking place, possibly in another thread. This method is purely indicative, and can be used by clients to minimize unnecessary blocking. The result offers no guarantee: by the time client code examines the boolean return value, another thread may have finished an existing or started a new analysis.
Determine if an analysis pass is required.
Record branch resolutions for dynamic callsites. This method does not enqueue the additional callsites for analysis; it is the responsibility of the caller to do so.
| instructionAddress | the address of a branching instruction making use of a dynamic callsite |
|---|---|
| resolved | true if the target if a true resolution, false if the target is one candidate among possibly many candidate targets |
| target | the target, not null |
| prepareAnalysis | if true, the method may decide to enqueue the target for routine analysis; the decision process depends on whether the instruction is a flow break, call-to-sub, or none, as well as other parameters like whether the added callsite was already known |