Uses of Interface
com.pnfsoftware.jeb.core.units.code.android.ir.IDMethodContext
Packages that use IDMethodContext
Package
Description
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.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.ctxlist
The list of IR method contexts available to the optimizer.AbstractDOptimizer.ctxlist
If 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.ctx
andAbstractDOptimizer.cfg
will 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 TypeMethodDescriptionint
AbstractDInstrumenter.afterFailedPass
(IDOptimizer opt, IDMethodContext ctx, Exception ex) The default implementation returns 0 (proceed).int
IDMasterOptimizerInstrumenter.afterFailedPass
(IDOptimizer opt, IDMethodContext ctx, Exception ex) This method is called by the MO after a method-optimizer failed.int
AbstractDInstrumenter.afterPass
(IDOptimizer opt, IDMethodContext ctx, int optcnt) The default implementation returns 0 (proceed).int
IDMasterOptimizerInstrumenter.afterPass
(IDOptimizer opt, IDMethodContext ctx, int optcnt) This method is called by the MO after a method-optimizer successfully returned.void
AbstractDOptimizer.assignLocalFields
(IDMethodContext _ctx) This convenience method can be used to assign the object's attributes (e.g.int
AbstractDInstrumenter.beforePass
(IDOptimizer opt, IDMethodContext ctx) The default implementation returns 0 (proceed).int
IDMasterOptimizerInstrumenter.beforePass
(IDOptimizer opt, IDMethodContext ctx) This method is called by the MO before a method-optimizer is about to be executed.static boolean
DUtil.canHandlerCatchException
(IDMethodContext ctx, IDExceptionHandler h, String exceptionSig) boolean
IDExpression.canThrow
(IDMethodContext ctx) Determine whether a hypothetical execution of this IR expression could throw.static int
DUtil.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 IDMasterOptimizer
IDGlobalContext.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 String
DUtil.generateNativeAddress
(IDMethodContext ctx, IDExpression elt) static ICodeCoordinates
DUtil.generateNativeCoordinates
(IDMethodContext ctx, IDExpression elt) static String
DUtil.getExceptionSignature
(IDMethodContext ctx, IDExceptionHandler h) boolean
IDExpression.hasSideEffects
(IDMethodContext ctx, boolean includeCanThrow) Determine whether a hypothetical execution of this IR expression would change the program internal state.static void
DUtil.insertHeaderBlock
(IDMethodContext ctx, int reqInsnCount, int reqInsnSize) Insert a header block filled with NOP instructions.boolean
IDExceptionHandler.isCatchAll
(IDMethodContext ctx) Determine whether this handler is a catch-all.boolean
IDExceptionHandler.isCatchAll
(IDMethodContext ctx, boolean onlyTrueCatchAll) Determine whether this handler is a catch-all.static boolean
DUtil.isProtectedByCatchAll
(IDMethodContext ctx, BasicBlock<IDInstruction> blk) Determine whether the provided block is protected by acatch-all
(catching Throwable).static boolean
DUtil.isUsingCaughtException
(IDMethodContext ctx, BasicBlock<IDInstruction> b) void
IDMethodContext.load
(IDMethodContext sourceContext) Load the constituents of a source context into this context.static boolean
DUtil.mergeBlocks
(IDMethodContext ctx, BasicBlock<IDInstruction> firstBlock) Merge two blocks.static boolean
DUtil.modifyInstructionSize
(IDMethodContext ctx, IDInstruction targetInstruction, int minWantedSize) Modify the size of an instruction within a CFG.static int
DUtil.modifyInstructionSizes
(IDMethodContext ctx, Function<IDInstruction, Integer> modifier) Update the instruction sizes of a CFG.static int
DUtil.normalizeGraph
(IDMethodContext ctx) Normalize the IR by resetting all instructions to the unit size (1).static int
DUtil.normalizeGraph
(IDMethodContext ctx, int wantedInstructionSize) Normalize the IR by resetting all instructions to the required size.int
AbstractDCollectionOptimizer.perform
(IDMethodContext ctx) final int
AbstractDOptimizer.perform
(IDMethodContext ctx) int
IDOptimizer.perform
(IDMethodContext ctx) Run the optimizer on the provided target method.protected void
AbstractDCollectionOptimizer.recordMethodOptimization
(IDMethodContext ctx, int cnt) static int
DUtil.removeUnreachableBlocks
(IDMethodContext ctx) Remove unreachable blocks from an IR-CFG.IDInstruction.setContext
(IDMethodContext ctx) Update the instruction context.void
DFormattingContext.setMethodContext
(IDMethodContext ctx) static int
DUtil.simplifyJCondsAndSwitches
(IDMethodContext ctx) SimplifyDOpcodeType#JCOND
andDOpcodeType.IR_SWITCH
IR 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'sdefault
entry)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 int
DUtil.updateTargets
(IDMethodContext ctx, Map<Integer, Integer> oldToNewOffsets) static void
DUtil.verifyGraph
(IDMethodContext ctx) Verify an IR-CFG from a method context.static void
DUtil.verifyGraph
(IDMethodContext ctx, CFG<IDInstruction> cfg, IDTryData exdata, String dumpFilename, String info) Verify an IR-CFG.static void
DUtil.verifyGraph
(IDMethodContext ctx, String info) Verify an IR-CFG from a method context.static void
DUtil.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 TypeMethodDescriptionvoid
AbstractDCollectionOptimizer.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 int
AbstractDCollectionOptimizer.performOnCollection
(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) final int
AbstractDCollectionOptimizer.performOnCollection
(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) int
AbstractDOptimizer.performOnCollection
(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) int
AbstractDOptimizer.performOnCollection
(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) int
IDOptimizer.performOnCollection
(List<IDMethodContext> ctxlist, Map<IDMethodContext, Integer> pmcntmap) Run the optimizer on the provided collection of methods.int
IDOptimizer.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)