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

Class Overview

Specialized formatter specifically for IR CFG. Data chains and other elements may be rendered.

Summary

[Expand]
Inherited Fields
From class com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter
Public Constructors
ECFGFormatter(CFG<IEStatement> cfg)
ECFGFormatter(CFG<IEStatement> cfg, IVariableProvider varprv, boolean formatFineGrained)
Public Methods
String format(boolean formatAddresses, boolean formatChains, boolean formatInOut, IDFA<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 insnOffset, 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, boolean formatChains, boolean formatInOut, IDFA<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
formatChains true to format data chains
formatInOut true to format the input and output chains
dfa DFA object
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 insnOffset, IEStatement insn)

The default implementation does nothing.