public class

CFGFormatter

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter<InsnType extends com.pnfsoftware.jeb.core.units.code.IInstruction>
Known Direct Subclasses

Summary

Public Constructors
CFGFormatter(CFG<InsnType> cfg)
Legacy CFG formatter.
CFGFormatter(CFG<InsnType> cfg, IVariableProvider varprv, boolean formatFineGrained)
Build a CFG formatter with an optional variable provider to aid in the representation of data chains.
Public Methods
String format(boolean formatAddresses, int formatChains, boolean formatInOut, IFormattingContextFactory<InsnType> fcf)
Format the CFG into a printable string, with optional data chains.
String formatSimple()
Convenience method.
String formatWithSimpleChains()
Convenience method.
CFG<InsnType> getCfg()
Protected Methods
String extraInstructionDetails(long address, InsnType insn)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CFGFormatter (CFG<InsnType> cfg)

Legacy CFG formatter. Variables/registers/bits in data chains are represented by their ids.

Parameters
cfg a CFG

public CFGFormatter (CFG<InsnType> cfg, IVariableProvider varprv, boolean formatFineGrained)

Build a CFG formatter with an optional variable provider to aid in the representation of data chains.

Parameters
cfg a CFG
varprv optional variable provider
formatFineGrained N/A if no varprv is null; else, determine if the chains should be represented fine grained (partial variable use is explicitly shown), or coarse grained (any bit of a variable being used will be represented as a full variable use)

Public Methods

public String format (boolean formatAddresses, int formatChains, boolean formatInOut, IFormattingContextFactory<InsnType> fcf)

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

Parameters
formatAddresses true to prepend instructions by their address
formatChains 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 String formatSimple ()

Convenience method. Format a CFG without any chain.

public String formatWithSimpleChains ()

Convenience method. Format a CFG with simple data chains.

public CFG<InsnType> getCfg ()

Protected Methods

protected String extraInstructionDetails (long address, InsnType insn)