public interface

IEPrototypeHandler

com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEPrototypeHandler
Known Indirect Subclasses

Class Overview

Wildcard prototype (eprototype) handler, used to apply, retrieve, and refine eprototypes applied to decompiled routines.

Summary

Public Methods
abstract boolean applyKnownPrototype(boolean createCopies)
Apply a known prototype to the current CFG.
abstract boolean refinePrototype()
Use a final CFG state to refine the method wildcard prototype.
abstract boolean retrieveFromPrototype(List<IEGeneric> params, List<IWildcardType> rettypes)
Collect parameter EVars and return type(s).

Public Methods

public abstract boolean applyKnownPrototype (boolean createCopies)

Apply a known prototype to the current CFG. Wildcard types will be applied to EVars. New EVar may be created (eg, stack EVars, dual-slot EVars).

Required state:
- CFG var copy-replacement must have been done (SSA okay as well).
- No copy-split no copy-merge must have been performed (only single copy)

Returns
  • success indicator

public abstract boolean refinePrototype ()

Use a final CFG state to refine the method wildcard prototype. The current IERoutineContext's wildcard prototype is updated.

Example: after analysis, a routine prototype may have been determined to be ?(?,?) (= 1 return, 2 params). The actual types have yet to be determined. The CFG instructions (after typing) may carry such information. It is especially important for return types.

Returns
  • true if the wildcard prototype in the IR context was updated

public abstract boolean retrieveFromPrototype (List<IEGeneric> params, List<IWildcardType> rettypes)

Collect parameter EVars and return type(s). A prototype must exist.

Parameters
params output array to collect parameters info
rettypes output array to collect the return types
Returns
  • success indicator