Uses of Interface
com.pnfsoftware.jeb.core.units.code.asm.decompiler.IERoutineContext
Packages that use IERoutineContext
Package
Description
This package and its sub-packages contain the types used to access
gendec
, JEB's generic
decompiler.Types used to create and access
gendec
's IR (Intermediate Representation).Types used by the IR template and IR compiler.
IR emulator facility.
Types specific to
gendec
's IR optimizers.-
Uses of IERoutineContext in com.pnfsoftware.jeb.core.units.code.asm.decompiler
Fields in com.pnfsoftware.jeb.core.units.code.asm.decompiler declared as IERoutineContextModifier and TypeFieldDescriptionprotected IERoutineContext
AbstractConverter.ctx
Per-routine data - works because convert() is not re-entrant (same found in X86ConvXxx helper classes).
Should be set before converting a routine, and reset to null after it's done.Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler that return IERoutineContextModifier and TypeMethodDescriptionAbstractConverter.convert
(INativeMethodItem routine) Convert the blocks of the native routine's CFG after the other.IEConverter.convert
(INativeMethodItem routine) Convert a native code routine to its initial intermediate representation.IEGlobalContext.createRoutineContext()
Create a new routine-less routine context.IEGlobalContext.createRoutineContext
(INativeMethodItem routine) Create a new routine context.IDecompiledMethod.getIRContext()
IEGlobalContext.getRoutineContext
(int index) Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler that return types with arguments of type IERoutineContextModifier and TypeMethodDescriptionIEGlobalContext.getRoutineContexts()
Retrieve a list of all converted routines.Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler with parameters of type IERoutineContextModifier and TypeMethodDescriptionvoid
IEGlobalContext.addRoutineContext
(IERoutineContext ctx) Register a routine context with this global context.AbstractNativeDecompilerExtension.augmentSimulationContext
(INativeDecompilerContext decompiler, IERoutineContext ctx, IESimulationResults simulationContext, long offset, IEStatement insn, EState state) The default implementation does nothing and requests continuation.INativeDecompilerExtension.augmentSimulationContext
(INativeDecompilerContext decompiler, IERoutineContext ctx, IESimulationResults simulationContext, long offset, IEStatement insn, EState state) This method is called during the early simulation phase (unoptimized IR emulation) in the decompilation pipeline.AbstractConverter.buildFailsafePrototype
(IERoutineContext ctx, IEStatement stm) The default implementation provides a no-arg/no-return prototype: "void __defaultCC ()".IEConverter.buildFailsafePrototype
(IERoutineContext ctx, IEStatement stm) Create a simple, failsafe prototype for the given routine.AbstractNativeDecompilerExtension.convertInstruction
(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e) The default implementation does nothing and requests continuation.INativeDecompilerExtension.convertInstruction
(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e) Convert a native instruction to IR code.AbstractConverter.convertParameterExpressions
(IERoutineContext ctx, IWildcardPrototype prototype, INativeMethodItem targetRoutine, List<IWildcardType> varArgTypes) IEConverter.convertParameterExpressions
(IERoutineContext ctx, IWildcardPrototype prototype, INativeMethodItem targetRoutine, List<IWildcardType> varArgTypes) Given a prototype, determine the list of IR expressions representing the input expressions (would also contain implicitly read registers).AbstractConverter.convertReturnExpressions
(IERoutineContext ctx, IWildcardPrototype prototype, INativeMethodItem targetRoutine, List<IWildcardType> varArgTypes, List<IEGeneric> outSpoiled) IEConverter.convertReturnExpressions
(IERoutineContext ctx, IWildcardPrototype prototype, INativeMethodItem targetRoutine, List<IWildcardType> varArgTypes, List<IEGeneric> outSpoiled) Given a prototype, determine the list of IR expressions representing the output expressions.AbstractConverter.convertReturnLocation
(IERoutineContext ctx, IWildcardPrototype prototype) IEConverter.convertReturnLocation
(IERoutineContext ctx, IWildcardPrototype prototype) Given a prototype, determine the IR expression representing the return address location of a call to a method of said prototype.AbstractNativeDecompilerExtension.convertToInlinedCall
(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e, long target) The default implementation does nothing and requests continuation.INativeDecompilerExtension.convertToInlinedCall
(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e, long target) INativeDecompilerContext.createIROptimizer
(IERoutineContext ectx) IEGlobalContext.createSymbolForData
(INativeDataItem data, IERoutineContext userctx) IEGlobalContext.createSymbolForRoutine
(INativeMethodItem routine, IERoutineContext userctx) int
AbstractConverter.defaultPCConversion
(IERoutineContext ctx) int
IEConverter.defaultPCConversion
(IERoutineContext ctx) Convert PC-assignment toIEJumpFar
statements.AbstractConverter.evaluateUntranslatedIR
(IEUntranslatedInstruction insn, IERoutineContext ectx, EState state) The default implementation returns null.IEConverter.evaluateUntranslatedIR
(IEUntranslatedInstruction insn, IERoutineContext ectx, EState state) Evaluate untranslated IR instructions.AbstractConverter.generateASTForUntranslatedIR
(IEUntranslatedInstruction insn, IERoutineContext ectx, ICMethod cctx) The default implementation returns null.IEConverter.generateASTForUntranslatedIR
(IEUntranslatedInstruction insn, IERoutineContext ectx, ICMethod cctx) Generate C statement from an untranslated IR instruction.AbstractConverter.getInputVariableByIndex
(IERoutineContext ctx, int i) The default implementation returns null.IEConverter.getInputVariableByIndex
(IERoutineContext ctx, int i) AbstractConverter.getOutputVariableByIndex
(IERoutineContext ctx, int i) The default implementation returns null.IEConverter.getOutputVariableByIndex
(IERoutineContext ctx, int i) AbstractConverter.getPrototypeHandler
(IERoutineContext ctx) IEConverter.getPrototypeHandler
(IERoutineContext ctx) Create an instance of a prototype handler.INativeObjectTracker.getSymbolForNativeItem
(INativeItem item, INativeMethodItem userctx, IERoutineContext ectx) protected final boolean
AbstractConverter.insertOptionalEntryPointTrampoline
(IERoutineContext ctx, List<IEStatement> irlist) For native routines that have their entry point in-the-middle (i.e., not at their lowest address), insert a syntheticIEJump
as the first instruction of the converted method.int
AbstractConverter.insertReturns
(IERoutineContext ctx) int
IEConverter.insertReturns
(IERoutineContext ctx) This method introducesIEReturn
statements into the IR.AbstractNativeDecompilerExtension.isMemoryResolutionAllowed
(INativeDecompilerContext decompiler, IERoutineContext ctx, IEMem mem) The default implementation does nothing and requests continuation.INativeDecompilerExtension.isMemoryResolutionAllowed
(INativeDecompilerContext decompiler, IERoutineContext ctx, IEMem mem) This method is called when the decompiler is attempting to dereference memory in order to replace a memory access by an actual immediate value.protected void
AbstractConverter.postRoutineConversion
(INativeMethodItem routine, IERoutineContext ctx) Executed byconvert
after converting the blocks.protected void
AbstractConverter.preRoutineConversion
(INativeMethodItem routine, IERoutineContext ctx, List<IEStatement> irlist) Executed byconvert
before converting the blocks.boolean
IEGlobalContext.removeRoutineContext
(IERoutineContext ctx, boolean stopTrackingNativeDeps) Delete a converted routine.boolean
AbstractConverter.resolveCustomCalls
(IERoutineContext ctx) boolean
IEConverter.resolveCustomCalls
(IERoutineContext ctx) Implementations should be aggressive and fast: calls to this method should always be enclosed in a try-catch.AbstractNativeDecompilerExtension.resolveVariableArgumentInformation
(IERoutineContext ctx, CFG<IEStatement> cfg, int iblk, IWildcardPrototype proto) INativeDecompilerExtension.resolveVariableArgumentInformation
(IERoutineContext ctx, CFG<IEStatement> cfg, int iblk, IWildcardPrototype proto) void
AbstractConverter.setCurrentContext
(IERoutineContext ctx) setup the helper converter classes -
Uses of IERoutineContext in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir
Fields in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir declared as IERoutineContextModifier and TypeFieldDescriptionEDefUseInfo.ctx
protected IERoutineContext
EPrototypeHandler.ctx
Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir that return IERoutineContextModifier and TypeMethodDescriptionEDefUseInfo.getContext()
ETypeInfo.getContext()
IEStatement.getContext()
Get the decompiled routine context that owns this statement.ELocation.getRoutineContext()
EState.Frame.getRoutineContext()
EState.getRoutineContext()
IEStackManager.getRoutineContext()
Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir with parameters of type IERoutineContextModifier and TypeMethodDescriptionstatic IECond
EUtil.abs
(IERoutineContext ctx, IEGeneric a) OperationMath#abs(int, int)
applied toIEGeneric
static Boolean
EUtil.checkCallReturnAddress
(IERoutineContext ctx, CFG<IEStatement> cfg, BasicBlock<IEStatement> b, int insnIndex) static IEGeneric
EUtil.compose
(IERoutineContext ctx, IEGeneric... elts) Create a composition if the provided list of elements contains at least two entries, else return the single element.static IEGeneric
EUtil.compose
(IERoutineContext ctx, Collection<IEGeneric> elts) Create a composition if the provided list of elements contains at list two entries, else return the single element.static boolean
EUtil.expandCalls
(IERoutineContext ctx, boolean alsoExpandPCAssign) Call/PC-assign expansion: augment the size to at least 2, to accommodate splitting:
- if an EReturn is to be inserted (tail-calls) in lieu of a ECall
- if a raw PC-assign cannot be converted to a single EJumpFarstatic CFG<IEStatement>
EUtil.expandStatementSize
(IERoutineContext ectx, IEStatement stm0, int minSize) Expand thesize
of a statement.static CFG<IEStatement>
EUtil.expandStatementSizes
(IERoutineContext ectx, Collection<IEStatement> stmcoll, int minSize) Expand thesizes
of a collection of statements.static IECond
EUtil.fabs
(IERoutineContext ctx, IEGeneric a) OperationMath#abs(float, float)
applied toIEGeneric
static IECond
EUtil.fmax
(IERoutineContext ctx, IEGeneric a, IEGeneric b) OperationMath.max(float, float)
applied toIEGeneric
static IECond
EUtil.fmin
(IERoutineContext ctx, IEGeneric a, IEGeneric b) OperationMath.min(float, float)
applied toIEGeneric
static String
EUtil.formatIR
(IERoutineContext ectx) Format an IR-CFG.static String
EUtil.formatIR
(IERoutineContext ectx, boolean displayOffsets, boolean displayDataChains, boolean displayTypes) Format an IR-CFG.static CharSequence
EState.formatVars
(Map<Integer, IEImm> vars, IEGlobalContext gctx, IERoutineContext ctx) static CharSequence
EState.formatVars
(Map<Integer, IEImm> vars, IEGlobalContext gctx, IERoutineContext ctx, Collection<Integer> includedIds, Collection<Integer> excludedIds, boolean skipZeroRegs) static String
EUtil.formatVars
(IERoutineContext ctx, int... varids) static String
EUtil.formatVars
(IERoutineContext ctx, Collection<Integer> varids) IEGeneric.generateC
(IERoutineContext ectx, ICMethod cctx) Generate the C abstract syntax tree portion for this expression.IEStatement.generateC
(IERoutineContext ectx, ICMethod cctx) IEVar.generateC
(IERoutineContext ectx, ICMethod cctx, int position) Specialized C Variable generator, allowing the specification of the variable position within its containing expression.IEVar.generateC
(IERoutineContext ectx, ICMethod cctx, int position, boolean deref) Specialized C Variable generator, allowing the specification of the variable position within its containing expression.EUtil.getVars
(IERoutineContext ctx, Collection<Integer> varids) static boolean
EUtil.hasLinearControlFlow
(IERoutineContext ctx) Checks if an IR routine contains only basic blocks with one parent and one child (no merge or disjunction of control-flow).static IECond
EUtil.max
(IERoutineContext ctx, IEGeneric a, IEGeneric b, boolean signed) OperationMath.max(int, int)
applied toIEGeneric
static IECond
EUtil.min
(IERoutineContext ctx, IEGeneric a, IEGeneric b, boolean signed) OperationMath.min(int, int)
applied toIEGeneric
static IEGeneric
EVarCopyFinder.retrieveVariableForRegister
(IERoutineContext ctx, IEGeneric exp, Collection<Integer> filters, boolean createIfNotFound, Long irOffset) void
ECFGFormatter.setContext
(IERoutineContext ectx) void
EState.setRoutineContext
(IERoutineContext ectx) static void
EUtil.verify
(IERoutineContext ctx) Verify an IR-CFG.Constructors in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir with parameters of type IERoutineContextModifierConstructorDescriptionEDefUseInfo
(int flags, IERoutineContext ctx) ELocation
(IERoutineContext ctx, long stmOffset) ETypeInfo
(IERoutineContext ectx) EVarCopyFinder
(IERoutineContext ctx, StorageEntry entry, Collection<Integer> filters, Long irOffset) PreRoutineInvocationDetails
(IERoutineContext ectx, EState state) -
Uses of IERoutineContext in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler
Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler that return IERoutineContextModifier and TypeMethodDescriptionECompiler.CompiledExpression.getContext()
ECompiler.CompiledRoutine.getContext()
ECompiler.CompiledStatement.getContext()
EPatternMatcher.getContext()
EPatternMatcher.Result.getContext()
Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler with parameters of type IERoutineContextModifier and TypeMethodDescriptionECompiler.compileCfg
(IERoutineContext ctx, String... slist) Compile a sequence of statements and return the CFG.ECompiler.compileExpression
(IERoutineContext ctx, String s) Compile a non-statement expression.ECompiler.compileStatement
(IERoutineContext ctx, String s) Compile a single statement.Constructors in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler with parameters of type IERoutineContextModifierConstructorDescriptionCompiledExpression
(IERoutineContext ctx, IEGeneric expr) EExpressionGenerator
(IERoutineContext ctx, INode template) EPatternMatcher
(EPatternCompiler.EPattern pattern, CFG<IEStatement> cfg, IERoutineContext ctx) EPatternMatcher
(EPatternCompiler.EPattern pattern, IEGeneric exp, IERoutineContext ctx) -
Uses of IERoutineContext in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator
Methods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator with parameters of type IERoutineContextModifier and TypeMethodDescriptionvoid
EEmulator.setStubExecution
(IERoutineContext ctx, int irStart, int irStop) -
Uses of IERoutineContext in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt
Fields in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt declared as IERoutineContextMethods in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt with parameters of type IERoutineContextModifier and TypeMethodDescriptionboolean
EMasterOptimizer.canDiscardReachingOutDefinition
(IERoutineContext ectx, long insnAddress, int def) boolean
IEMasterOptimizer.canDiscardReachingOutDefinition
(IERoutineContext ectx, long insnAddress, int def) Check if an unused variable definition, bleeding out from the routine, may be safely discarded.boolean
EMasterOptimizer.canDiscardUnusedDefinition
(IERoutineContext ectx, long insnAddress, int def) boolean
IEMasterOptimizer.canDiscardUnusedDefinition
(IERoutineContext ectx, long insnAddress, int def) Check if an unused variable definition, not bleeding out from the routine, may be safely discarded.protected String
EMasterOptimizer.getTargetAddress
(IERoutineContext target) protected boolean
EMasterOptimizer.onOptimizerException
(IERoutineContext ctx, IOptimizer<IERoutineContext> opt, Exception ex) AbstractEExpressionOptimizer.performOnExpression
(IEGeneric exp, IERoutineContext ectx) AbstractEOptimizer.performOnExpression
(IEGeneric exp, IERoutineContext ectx) The default implementation does nothing and returns null.AbstractEPatternOptimizer.performOnExpression
(IEGeneric exp, IERoutineContext ectx) IEOptimizer.performOnExpression
(IEGeneric exp, IERoutineContext ectx) Optimize a single expression.final int
AbstractEOptimizer.performOnTarget
(IERoutineContext ctx) Same asperform(true)
.protected void
EMasterOptimizer.postAllOptimizationsCallback
(IERoutineContext ctx) protected void
EMasterOptimizer.postOptimizationCallback
(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e, int cnt, long executionTimeMs) protected void
EMasterOptimizer.preAllOptimizationsCallback
(IERoutineContext ctx) protected void
EMasterOptimizer.preOptimizationCallback
(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e) Method parameters in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt with type arguments of type IERoutineContextModifier and TypeMethodDescriptionprotected boolean
EMasterOptimizer.onOptimizerException
(IERoutineContext ctx, IOptimizer<IERoutineContext> opt, Exception ex) protected void
EMasterOptimizer.postOptimizationCallback
(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e, int cnt, long executionTimeMs) protected void
EMasterOptimizer.preOptimizationCallback
(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e) Constructors in com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.opt with parameters of type IERoutineContextModifierConstructorDescriptionCreate a standard IR master optimizer with no maximum runcount (unsafe).EMasterOptimizer
(IERoutineContext ectx, int grp1NMaxRunCount) Create a standard IR master optimizer.EMasterOptimizer
(IERoutineContext ectx, int grp1NMaxRunCount, boolean autoRegisterStandardOptimizers) Create a standard IR master optimizer.