Class ECFGFormatter
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter<IEStatement>
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.ECFGFormatter
Specialized formatter specifically for IR CFG. Data chains and other elements may be rendered.
-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter
cfgfwccnt
-
Constructor Summary
ConstructorsConstructorDescriptionECFGFormatter
(CFG<IEStatement> cfg) ECFGFormatter
(CFG<IEStatement> cfg, IVariableProvider varprv, boolean formatFineGrained) -
Method Summary
Modifier and TypeMethodDescriptionformat
(boolean formatAddresses, boolean formatChains, boolean formatInOut, IDFA<IEStatement> dfa, IFormattingContextFactory<IEStatement> fcf) Format the CFG into a printable string, with optional data chains.protected void
genAddress
(StringBuilder sb, long address, IEStatement insn) The default implementation generatesADDRESS/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.void
setContext
(IERoutineContext ectx) Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.cfg.CFGFormatter
formatChains, formatSimple, genAddressCharacter, genBOL, genHeader, genPostChains, genPreChains, genPreInstruction, genTrailer, getCfg, padLine
-
Constructor Details
-
ECFGFormatter
-
ECFGFormatter
-
-
Method Details
-
setContext
-
format
public String format(boolean formatAddresses, boolean formatChains, boolean formatInOut, IDFA<IEStatement> dfa, IFormattingContextFactory<IEStatement> fcf) Description copied from class:CFGFormatter
Format the CFG into a printable string, with optional data chains.- Overrides:
format
in classCFGFormatter<IEStatement>
- Parameters:
formatAddresses
- true to prepend instructions by their addressformatChains
- true to format data chainsformatInOut
- true to format the input and output chainsdfa
- DFA objectfcf
- optional context generator for instructions- Returns:
- the formatted CFG
-
genPreAddress
Description copied from class:CFGFormatter
The default implementation does nothing.- Overrides:
genPreAddress
in classCFGFormatter<IEStatement>
-
genAddress
Description copied from class:CFGFormatter
The default implementation generatesADDRESS/SIZE
.- Overrides:
genAddress
in classCFGFormatter<IEStatement>
-
genPostAddress
Description copied from class:CFGFormatter
The default implementation appends 2 spaces.- Overrides:
genPostAddress
in classCFGFormatter<IEStatement>
-
genPostInstruction
Description copied from class:CFGFormatter
The default implementation appends spaces to pad the current line to 120 characters (or more).- Overrides:
genPostInstruction
in classCFGFormatter<IEStatement>
-
genEOL
Description copied from class:CFGFormatter
The default implementation appends a New Line (\n
) character.- Overrides:
genEOL
in classCFGFormatter<IEStatement>
-