public abstract class

AbstractNativeDecompilerExtension

extends AbstractPlugin
implements INativeDecompilerExtension
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.AbstractPlugin
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.AbstractNativeDecompilerExtension

Class Overview

Skeleton for native decompiler extensions. Implementations must extend this class, they should not directly implement the extension interface.

Decompiler extensions are of two kinds:
- the primary extension, optionally provided by a decompiler plugin: this extension is always executed first by an extensions manager (and therefore, can decide to stop the execution of any subsequent extension), in the context of its decompiler
- secondary (additional) extensions, provided as external plugins to JEB: those extensions are shared objects among the native decompiler objects instantiated during a session. They must check the type of decompiler before performing meaningful operations (eg, an secondary extension meant to enhance an EVM decompiler should first make sure that it is called within the context of an EVM decompiler)

Summary

Fields
protected static final ILogger logger
Public Constructors
AbstractNativeDecompilerExtension()
AbstractNativeDecompilerExtension(String name)
Public Methods
ChainedOperationResult<Boolean> applyAdditionalTypes(IDecompiledMethod target, CFG<IEStatement> cfg)
The default implementation does nothing and requests continuation.
ChainedOperationResult<Boolean> augmentSimulationContext(IDecompilerManager decompiler, IERoutineContext ctx, IESimulationResults simulationContext, long offset, IEStatement insn, EState state)
The default implementation does nothing and requests continuation.
ChainedOperationResult<Boolean> convertInstruction(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e)
The default implementation does nothing and requests continuation.
ChainedOperationResult<Boolean> convertToInlinedCall(IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e, long target)
The default implementation does nothing and requests continuation.
ChainedOperationResult<Boolean> customizeIntermediateOptimizer(IDecompilerManager decompiler, IEMasterOptimizer mo)
The default implementation does nothing and requests continuation.
ChainedOperationResult<DecompilationStatus> executePostPipelineStage(NativeDecompilationStage stage, IDecompiledMethod target)
The default implementation returns IN_PROCESS and requests continuation.
ChainedOperationResult<DecompilationStatus> executePrePipelineStage(NativeDecompilationStage stage, IDecompiledMethod target)
The default implementation returns IN_PROCESS and requests continuation.
String getName()
EditablePluginInformation getPluginInformation()
Retrieve basic information about the plugin, such as name, version, author, and organization.
ChainedOperationResult<Boolean> isMemoryResolutionAllowed(IDecompilerManager decompiler, IERoutineContext ctx, IEMem mem)
The default implementation does nothing and requests continuation.
ChainedOperationResult<VariableArgumentInformation> resolveVariableArgumentInformation(IERoutineContext ctx, CFG<IEStatement> cfg, int iblk, IWildcardPrototype proto)
Protected Methods
void setName(String name)
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.AbstractPlugin
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.IPlugin
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.INativeDecompilerExtension

Fields

protected static final ILogger logger

Public Constructors

public AbstractNativeDecompilerExtension ()

public AbstractNativeDecompilerExtension (String name)

Public Methods

public ChainedOperationResult<Boolean> applyAdditionalTypes (IDecompiledMethod target, CFG<IEStatement> cfg)

The default implementation does nothing and requests continuation.

public ChainedOperationResult<Boolean> augmentSimulationContext (IDecompilerManager decompiler, IERoutineContext ctx, IESimulationResults simulationContext, long offset, IEStatement insn, EState state)

The default implementation does nothing and requests continuation.

Parameters
simulationContext simulation context, the extension may record information in this context
offset IR offset
insn IR instruction
state input pre-execution state at the provided instruction

public ChainedOperationResult<Boolean> convertInstruction (IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e)

The default implementation does nothing and requests continuation.

Parameters
e the entry to be converted, holding references to the IInstruction and current state of the IR basic block
Returns
  • success indicator - upon success, an extension must return TRUE/STOP, else another conversion will be attempted, leading to undefined behavior

public ChainedOperationResult<Boolean> convertToInlinedCall (IEConverter<?> converter, IERoutineContext ctx, ConverterInstructionEntry<?> e, long target)

The default implementation does nothing and requests continuation.

public ChainedOperationResult<Boolean> customizeIntermediateOptimizer (IDecompilerManager decompiler, IEMasterOptimizer mo)

The default implementation does nothing and requests continuation.

Parameters
mo IR master optimizer

public ChainedOperationResult<DecompilationStatus> executePostPipelineStage (NativeDecompilationStage stage, IDecompiledMethod target)

The default implementation returns IN_PROCESS and requests continuation.

Parameters
target the method being decompiled

public ChainedOperationResult<DecompilationStatus> executePrePipelineStage (NativeDecompilationStage stage, IDecompiledMethod target)

The default implementation returns IN_PROCESS and requests continuation.

Parameters
target the method being decompiled

public String getName ()

public EditablePluginInformation getPluginInformation ()

Retrieve basic information about the plugin, such as name, version, author, and organization.

Returns
  • the plugin information

public ChainedOperationResult<Boolean> isMemoryResolutionAllowed (IDecompilerManager decompiler, IERoutineContext ctx, IEMem mem)

The default implementation does nothing and requests continuation.

public ChainedOperationResult<VariableArgumentInformation> resolveVariableArgumentInformation (IERoutineContext ctx, CFG<IEStatement> cfg, int iblk, IWildcardPrototype proto)

Protected Methods

protected void setName (String name)