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 IERoutineContextAbstractConverter.ctxPer-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 TypeMethodDescriptionvoidIEGlobalContext.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) intAbstractConverter.defaultPCConversion(IERoutineContext ctx) intIEConverter.defaultPCConversion(IERoutineContext ctx) Convert PC-assignment toIEJumpFarstatements.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 booleanAbstractConverter.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 syntheticIEJumpas the first instruction of the converted method.intAbstractConverter.insertReturns(IERoutineContext ctx) intIEConverter.insertReturns(IERoutineContext ctx) This method introducesIEReturnstatements 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 voidAbstractConverter.postRoutineConversion(INativeMethodItem routine, IERoutineContext ctx) Executed byconvertafter converting the blocks.protected voidAbstractConverter.preRoutineConversion(INativeMethodItem routine, IERoutineContext ctx, List<IEStatement> irlist) Executed byconvertbefore converting the blocks.booleanIEGlobalContext.removeRoutineContext(IERoutineContext ctx, boolean stopTrackingNativeDeps) Delete a converted routine.booleanAbstractConverter.resolveCustomCalls(IERoutineContext ctx) booleanIEConverter.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) voidAbstractConverter.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.ctxprotected IERoutineContextEPrototypeHandler.ctxMethods 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 IECondEUtil.abs(IERoutineContext ctx, IEGeneric a) OperationMath#abs(int, int)applied toIEGenericstatic BooleanEUtil.checkCallReturnAddress(IERoutineContext ctx, CFG<IEStatement> cfg, BasicBlock<IEStatement> b, int insnIndex) static IEGenericEUtil.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 IEGenericEUtil.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 booleanEUtil.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 thesizeof a statement.static CFG<IEStatement>EUtil.expandStatementSizes(IERoutineContext ectx, Collection<IEStatement> stmcoll, int minSize) Expand thesizesof a collection of statements.static IECondEUtil.fabs(IERoutineContext ctx, IEGeneric a) OperationMath#abs(float, float)applied toIEGenericstatic IECondEUtil.fmax(IERoutineContext ctx, IEGeneric a, IEGeneric b) OperationMath.max(float, float)applied toIEGenericstatic IECondEUtil.fmin(IERoutineContext ctx, IEGeneric a, IEGeneric b) OperationMath.min(float, float)applied toIEGenericstatic StringEUtil.formatIR(IERoutineContext ectx) Format an IR-CFG.static StringEUtil.formatIR(IERoutineContext ectx, boolean displayOffsets, boolean displayDataChains, boolean displayTypes) Format an IR-CFG.static CharSequenceEState.formatVars(Map<Integer, IEImm> vars, IEGlobalContext gctx, IERoutineContext ctx) static CharSequenceEState.formatVars(Map<Integer, IEImm> vars, IEGlobalContext gctx, IERoutineContext ctx, Collection<Integer> includedIds, Collection<Integer> excludedIds, boolean skipZeroRegs) static StringEUtil.formatVars(IERoutineContext ctx, int... varids) static StringEUtil.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 booleanEUtil.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 IECondEUtil.max(IERoutineContext ctx, IEGeneric a, IEGeneric b, boolean signed) OperationMath.max(int, int)applied toIEGenericstatic IECondEUtil.min(IERoutineContext ctx, IEGeneric a, IEGeneric b, boolean signed) OperationMath.min(int, int)applied toIEGenericstatic IEGenericEVarCopyFinder.retrieveVariableForRegister(IERoutineContext ctx, IEGeneric exp, Collection<Integer> filters, boolean createIfNotFound, Long irOffset) voidECFGFormatter.setContext(IERoutineContext ectx) voidEState.setRoutineContext(IERoutineContext ectx) static voidEUtil.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 TypeMethodDescriptionvoidEEmulator.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 TypeMethodDescriptionbooleanEMasterOptimizer.canDiscardReachingOutDefinition(IERoutineContext ectx, long insnAddress, int def) booleanIEMasterOptimizer.canDiscardReachingOutDefinition(IERoutineContext ectx, long insnAddress, int def) Check if an unused variable definition, bleeding out from the routine, may be safely discarded.booleanEMasterOptimizer.canDiscardUnusedDefinition(IERoutineContext ectx, long insnAddress, int def) booleanIEMasterOptimizer.canDiscardUnusedDefinition(IERoutineContext ectx, long insnAddress, int def) Check if an unused variable definition, not bleeding out from the routine, may be safely discarded.protected StringEMasterOptimizer.getTargetAddress(IERoutineContext target) protected booleanEMasterOptimizer.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 intAbstractEOptimizer.performOnTarget(IERoutineContext ctx) Same asperform(true).protected voidEMasterOptimizer.postAllOptimizationsCallback(IERoutineContext ctx) protected voidEMasterOptimizer.postOptimizationCallback(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e, int cnt, long executionTimeMs) protected voidEMasterOptimizer.preAllOptimizationsCallback(IERoutineContext ctx) protected voidEMasterOptimizer.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 booleanEMasterOptimizer.onOptimizerException(IERoutineContext ctx, IOptimizer<IERoutineContext> opt, Exception ex) protected voidEMasterOptimizer.postOptimizationCallback(IERoutineContext ctx, OptimizerEntry<IERoutineContext> e, int cnt, long executionTimeMs) protected voidEMasterOptimizer.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.