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 voidgenAddress(StringBuilder sb, long address, IEStatement insn) The default implementation generatesADDRESS/SIZE.protected voidgenEOL(StringBuilder sb, long address, IEStatement insn) The default implementation appends a New Line (\n) character.protected voidgenPostAddress(StringBuilder sb, long address, IEStatement insn) The default implementation appends 2 spaces.protected voidgenPostInstruction(StringBuilder sb, long address, IEStatement insn) The default implementation appends spaces to pad the current line to 120 characters (or more).protected voidgenPreAddress(StringBuilder sb, long insnOffset, IEStatement insn) The default implementation does nothing.voidsetContext(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:CFGFormatterFormat the CFG into a printable string, with optional data chains.- Overrides:
formatin 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:CFGFormatterThe default implementation does nothing.- Overrides:
genPreAddressin classCFGFormatter<IEStatement>
-
genAddress
Description copied from class:CFGFormatterThe default implementation generatesADDRESS/SIZE.- Overrides:
genAddressin classCFGFormatter<IEStatement>
-
genPostAddress
Description copied from class:CFGFormatterThe default implementation appends 2 spaces.- Overrides:
genPostAddressin classCFGFormatter<IEStatement>
-
genPostInstruction
Description copied from class:CFGFormatterThe default implementation appends spaces to pad the current line to 120 characters (or more).- Overrides:
genPostInstructionin classCFGFormatter<IEStatement>
-
genEOL
Description copied from class:CFGFormatterThe default implementation appends a New Line (\n) character.- Overrides:
genEOLin classCFGFormatter<IEStatement>
-