Uses of Interface
com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext
Packages that use IDMethodContext
Package
Description
This package and sub-packages contain all types used by Android code analysis plugins.
This package contains types used to publicly access and manipulate JEB's DEX Decompiler (referred
to as
dexdec) Intermediate Representation (IR) objects.-
Uses of IDMethodContext in com.pnfsoftware.jeb.core.units.code.android
Methods in com.pnfsoftware.jeb.core.units.code.android that return IDMethodContextModifier and TypeMethodDescriptionIDexDecompilerUnit.retrieveCachedIR(String msig) Attempt to retrieve the Intermediate Representation (IR) of a previously decompiled method. -
Uses of IDMethodContext in com.pnfsoftware.jeb.core.units.code.android.ir
Fields in com.pnfsoftware.jeb.core.units.code.android.ir declared as IDMethodContextFields in com.pnfsoftware.jeb.core.units.code.android.ir with type parameters of type IDMethodContextModifier and TypeFieldDescriptionAbstractDCollectionOptimizer.ctxlistThe list of IR method contexts available to the optimizer.AbstractDOptimizer.ctxlistIf the optimizer is a regular method optimizer (an optimizer targeting a single method), this field is null.
If the optimizer is a class optimizer,AbstractDOptimizer.ctxandAbstractDOptimizer.cfgwill be initially set to null, and this field contains the list of IR method contexts available to the optimizer.Methods in com.pnfsoftware.jeb.core.units.code.android.ir that return IDMethodContextModifier and TypeMethodDescriptionIDMethodContext.copy()Create a copy of this context.DTypeInfo.getContext()IDInstruction.getContext()Retrieve the IR method context to which this instruction belongs.DFormattingContext.getMethodContext()IDMethodContext.getParentContext()IDMasterOptimizer.getTarget()Retrieve the IR method context to be optimized.IDInstruction.setContext(IDMethodContext ctx) Update the instruction context.Methods in com.pnfsoftware.jeb.core.units.code.android.ir that return types with arguments of type IDMethodContextModifier and TypeMethodDescriptionAbstractDCollectionOptimizer.generatePerClassContextsMap()IDMethodContext.getChildrenContexts()IDMethodContext.getCopiesContexts()Methods in com.pnfsoftware.jeb.core.units.code.android.ir with parameters of type IDMethodContextModifier and TypeMethodDescriptionintAbstractDInstrumenter.afterFailedPass(IDOptimizer opt, IDMethodContext ctx, Exception ex) The default implementation returns 0 (proceed).intIDMasterOptimizerInstrumenter.afterFailedPass(IDOptimizer opt, IDMethodContext ctx, Exception ex) This method is called by the MO after a method-optimizer failed.intAbstractDInstrumenter.afterPass(IDOptimizer opt, IDMethodContext ctx, int optcnt) The default implementation returns 0 (proceed).intIDMasterOptimizerInstrumenter.afterPass(IDOptimizer opt, IDMethodContext ctx, int optcnt) This method is called by the MO after a method-optimizer successfully returned.voidAbstractDOptimizer.assignLocalFields(IDMethodContext _ctx) This convenience method can be used to assign the object's attributes (e.g.intAbstractDInstrumenter.beforePass(IDOptimizer opt, IDMethodContext ctx) The default implementation returns 0 (proceed).intIDMasterOptimizerInstrumenter.beforePass(IDOptimizer opt, IDMethodContext ctx) This method is called by the MO before a method-optimizer is about to be executed.static booleanDUtil.canHandlerCatchException(IDMethodContext ctx, IDExceptionHandler h, String exceptionSig) booleanIDExpression.canThrow(IDMethodContext ctx) Determine whether a hypothetical execution of this IR expression could throw.static intDUtil.cleanGraph(IDMethodContext ctx) Clean the graph of an IR method context.static CFG<IDInstruction>DUtil.copyGraph(CFG<IDInstruction> cfg, boolean deepCopy, IDMethodContext newContext) Copy an IR-CFG.default IDMasterOptimizerIDGlobalContext.createMasterOptimizer(IDMethodContext methodContext) Create a pre-initialized master optimizer targeting the provided method.IDGlobalContext.createMasterOptimizer(IDMethodContext methodContext, boolean registerBuiltinOptimizers, boolean initializeWithDexdecSettings, boolean registerExternalOptimizers) Create a master optimizer targeting the provided method.IDExpression.evaluate(IDMethodContext ctx) Convenience method: Evaluate this expression within the context of the provided method.IDExpression.generateAST(IDMethodContext ctx, IJavaMethod m) Generate the Java AST element for this IR expression.DUtil.generateBlockOffsetMap(IDMethodContext ctx) Generate an offset IR-to-native offset conversion map.static StringDUtil.generateNativeAddress(IDMethodContext ctx, IDExpression elt) static ICodeCoordinatesDUtil.generateNativeCoordinates(IDMethodContext ctx, IDExpression elt) static StringDUtil.getExceptionSignature(IDMethodContext ctx, IDExceptionHandler h) booleanIDExpression.hasSideEffects(IDMethodContext ctx, boolean includeCanThrow) Determine whether a hypothetical execution of this IR expression would change the program internal state.static voidDUtil.insertHeaderBlock(IDMethodContext ctx, int reqInsnCount, int reqInsnSize) Insert a header block filled with NOP instructions.booleanIDExceptionHandler.isCatchAll(IDMethodContext ctx) Determine whether this handler is a catch-all.booleanIDExceptionHandler.isCatchAll(IDMethodContext ctx, boolean onlyTrueCatchAll) Determine whether this handler is a catch-all.static booleanDUtil.isProtectedByCatchAll(IDMethodContext ctx, BasicBlock<IDInstruction> blk) Determine whether the provided block is protected by acatch-all(catching Throwable).static booleanDUtil.isUsingCaughtException(IDMethodContext ctx, BasicBlock<IDInstruction> b) voidIDMethodContext.load(IDMethodContext sourceContext) Load the constituents of a source context into this context.static booleanDUtil.mergeBlocks(IDMethodContext ctx, BasicBlock<IDInstruction> firstBlock) Merge two blocks.static booleanDUtil.modifyInstructionSize(IDMethodContext ctx, IDInstruction targetInstruction, int minWantedSize) Modify the size of an instruction within a CFG.static intDUtil.modifyInstructionSizes(IDMethodContext ctx, Function<IDInstruction, Integer> modifier) Update the instruction sizes of a CFG.static intDUtil.normalizeGraph(IDMethodContext ctx) Normalize the IR by resetting all instructions to the unit size (1).static intDUtil.normalizeGraph(IDMethodContext ctx, int wantedInstructionSize) Normalize the IR by resetting all instructions to the required size.intAbstractDCollectionOptimizer.perform(IDMethodContext ctx) final intAbstractDOptimizer.perform(IDMethodContext ctx) intIDOptimizer.perform(IDMethodContext ctx) Run the optimizer on the provided target method.protected voidAbstractDCollectionOptimizer.recordMethodOptimization(IDMethodContext ctx, int cnt) static intDUtil.removeUnreachableBlocks(IDMethodContext ctx) Remove unreachable blocks from an IR-CFG.IDInstruction.setContext(IDMethodContext ctx) Update the instruction context.voidDFormattingContext.setMethodContext(IDMethodContext ctx) static intDUtil.simplifyJCondsAndSwitches(IDMethodContext ctx) SimplifyDOpcodeType#JCONDandDOpcodeType.IR_SWITCHIR instructions:
- JCOND: the target branch must not point to the fallthrough instruction; if it is, the JCOND must be replaced by a JUMP (while taking care of potential side-effects introduced by the evaluation of the JCOND predicate)
- SWITCH: the case targets must not point to the fallthrough instruction; if any does, the case entry must be removed (and will be taken care by the switch'sdefaultentry)static BasicBlock<IDInstruction>DUtil.splitBlock(IDMethodContext ctx, BasicBlock<IDInstruction> blk, int index) Split a block of the context's CFG into two blocks.IDElement.toString(IDMethodContext ctx) Generate a string representation of this IR using a standard formatting context.static List<IDInstruction>DUtil.unroll(IDMethodContext ctx, IDVar pivotVar, long addrStart, long addrEnd, int maxProcessedInsnCount, int maxUnrolledInsnCount, int maxLoopIterCnt) Attempt to unroll some code whose pivot is a singlevariable.static intDUtil.updateTargets(IDMethodContext ctx, Map<Integer, Integer> oldToNewOffsets) static voidDUtil.verifyGraph(IDMethodContext ctx) Verify an IR-CFG from a method context.static voidDUtil.verifyGraph(IDMethodContext ctx, CFG<IDInstruction> cfg, IDTryData exdata, String dumpFilename, String info) Verify an IR-CFG.static voidDUtil.verifyGraph(IDMethodContext ctx, String info) Verify an IR-CFG from a method context.static voidDUtil.verifyGraph(IDMethodContext ctx, String dumpFilename, String info) Verify an IR-CFG.Method parameters in com.pnfsoftware.jeb.core.units.code.android.ir with type arguments of type IDMethodContextModifier and TypeMethodDescriptionvoidAbstractDCollectionOptimizer.assignLocalFields(List<IDMethodContext> _ctxlist) This convenience method can be used to assign the object's attributes from the values of the provided IR contexts.final intAbstractDCollectionOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) final intAbstractDCollectionOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) intAbstractDOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) intAbstractDOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) intIDOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) Run the optimizer on the provided collection of methods.intIDOptimizer.performOnCollection(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) Run the optimizer on the provided collection of methods.Constructors in com.pnfsoftware.jeb.core.units.code.android.ir with parameters of type IDMethodContextModifierConstructorDescriptionCreate an object, ready to emulate an entire IR routine.Create a default formatting context.DTypeInfo(IDMethodContext ctx)