public class

ECFGFormatter

extends CFGFormatter<InsnType extends IInstruction>
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction>
     ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.ECFGFormatter

Summary

Public Constructors
ECFGFormatter(CFG<IEStatement> cfg)
ECFGFormatter(CFG<IEStatement> cfg, IVariableProvider varprv, boolean formatFineGrained)
Public Methods
String format(boolean formatAddresses, int formatChainsType, boolean formatInOut, DFA<IEStatement> dfa, IFormattingContextFactory<IEStatement> fcf)
Format the CFG into a printable string, with optional data chains.
void setContext(IERoutineContext ectx)
Protected Methods
void genAddress(StringBuilder sb, long address, IEStatement insn)
The default implementation generates ADDRESS/SIZE.
void genEOL(StringBuilder sb, long address, IEStatement insn)
The default implementation appends a New Line (\n) character.
void genPostAddress(StringBuilder sb, long address, IEStatement insn)
The default implementation appends 2 spaces.
void genPostInstruction(StringBuilder sb, long address, IEStatement insn)
The default implementation appends spaces to pad the current line to 120 characters (or more).
void genPreAddress(StringBuilder sb, long address, IEStatement insn)
The default implementation does nothing.
[Expand]
Inherited Methods
From class com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter
From class java.lang.Object

Public Constructors

public ECFGFormatter (CFG<IEStatement> cfg)

public ECFGFormatter (CFG<IEStatement> cfg, IVariableProvider varprv, boolean formatFineGrained)

Public Methods

public String format (boolean formatAddresses, int formatChainsType, boolean formatInOut, DFA<IEStatement> dfa, IFormattingContextFactory<IEStatement> fcf)

Format the CFG into a printable string, with optional data chains.

Parameters
formatAddresses true to prepend instructions by their address
formatChainsType 0=no, 1=simple chains, 2=full chains
formatInOut true to format the input(live) and output(reaching) registers
fcf optional context generator for instructions
Returns
  • the formatted CFG

public void setContext (IERoutineContext ectx)

Protected Methods

protected void genAddress (StringBuilder sb, long address, IEStatement insn)

The default implementation generates ADDRESS/SIZE.

protected void genEOL (StringBuilder sb, long address, IEStatement insn)

The default implementation appends a New Line (\n) character.

protected void genPostAddress (StringBuilder sb, long address, IEStatement insn)

The default implementation appends 2 spaces.

protected void genPostInstruction (StringBuilder sb, long address, IEStatement insn)

The default implementation appends spaces to pad the current line to 120 characters (or more).

protected void genPreAddress (StringBuilder sb, long address, IEStatement insn)

The default implementation does nothing.