Ghidra Decompiler Analysis Engine
Classes | Functions
ifacedecomp.hh File Reference

Console interface commands for the decompiler engine. More...

#include "ifaceterm.hh"
#include "graph.hh"
#include "grammar.hh"
#include "callgraph.hh"
#include "paramid.hh"
Include dependency graph for ifacedecomp.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IfaceDecompCapability
 Interface capability point for all decompiler commands. More...
 
class  IfaceDecompData
 Common data shared by decompiler commands. More...
 
class  IfaceAssemblyEmit
 Disassembly emitter that prints to a console stream. More...
 
class  IfaceDecompCommand
 Root class for all decompiler specific commands. More...
 
class  IfcSource
 Execute a command script : source <filename> More...
 
class  IfcOption
 Adjust a decompiler option: option <optionname> [<param1>] [<param2>] [<param3>] More...
 
class  IfcParseLine
 Parse a line of C syntax: parse line ... More...
 
class  IfcParseFile
 Parse a file with C declarations: parse file <filename> More...
 
class  IfcAdjustVma
 Change the base address of the load image: adjust vma 0xabcd0123 More...
 
class  IfcFuncload
 Make a specific function current: load function <functionname> More...
 
class  IfcAddrrangeLoad
 Create a new function at an address: load addr <address> [<funcname>] More...
 
class  IfcCleararch
 Clear the current architecture/program: clear architecture More...
 
class  IfcReadSymbols
 Read in symbols from the load image: read symbols More...
 
class  IfcMapaddress
 Map a new symbol into the program: map address <address> <typedeclaration> More...
 
class  IfcMaphash
 Add a dynamic symbol to the current function: map hash <address> <hash> <typedeclaration> More...
 
class  IfcMapfunction
 Create a new function: map function <address> [<functionname>] [nocode] More...
 
class  IfcMapexternalref
 Create an external ref symbol map externalref <address> <refaddress> [<name>] More...
 
class  IfcMaplabel
 Create a code label: map label <name> <address> More...
 
class  IfcPrintdisasm
 Print disassembly of a memory range: disassemble [<address1> <address2>] More...
 
class  IfcDump
 Display bytes in the load image: dump <address+size> More...
 
class  IfcDumpbinary
 Dump a memory to file: binary <address+size> <filename> More...
 
class  IfcDecompile
 Decompile the current function: decompile More...
 
class  IfcPrintLanguage
 Print current output using a specific language: print language <langname> More...
 
class  IfcPrintCXml
 Print the current function with C syntax and XML markup:print C xml More...
 
class  IfcPrintCFlat
 Print current function without control-flow: print C flat More...
 
class  IfcPrintCStruct
 Print the current function using C syntax:print C More...
 
class  IfcPrintCGlobals
 Print declarations for any known global variables: print C globals More...
 
class  IfcPrintCTypes
 Print any known type definitions: print C types More...
 
class  IfcProduceC
 Write decompilation for all functions to a file: produce C <filename> More...
 
class  IfcProducePrototypes
 Determine the prototype model for all functions: produce prototypes More...
 
class  IfcListaction
 List all current actions and rules for the decompiler: list action More...
 
class  IfcListOverride
 Display any overrides for the current function: list override More...
 
class  IfcListprototypes
 List known prototype models: list prototypes More...
 
class  IfcSetcontextrange
 Set a context variable: set context <name> <value> [<startaddress> <endaddress>] More...
 
class  IfcSettrackedrange
 Set the value of a register: set track <name> <value> [<startaddress> <endaddress>] More...
 
class  IfcBreakstart
 Set a break point at the start of an Action: break start <actionname> More...
 
class  IfcBreakaction
 Set a breakpoint when a Rule or Action executes: break action <actionname> More...
 
class  IfcPrintTree
 Print all Varnodes in the current function: print tree varnode More...
 
class  IfcPrintBlocktree
 Print a description of the current functions control-flow: print tree block More...
 
class  IfcPrintSpaces
 Print all address spaces: print spaces More...
 
class  IfcPrintHigh
 Display all Varnodes in a HighVariable: print high <name> More...
 
class  IfcPrintParamMeasures
 Perform parameter-id analysis on the current function: print parammeasures More...
 
class  IfcRename
 Rename a variable: rename <oldname> <newname> More...
 
class  IfcRetype
 Change the data-type of a symbol: retype <varname> <typedeclaration> More...
 
class  IfcRemove
 Remove a symbol by name: remove <varname> More...
 
class  IfcPrintVarnode
 Print information about a Varnode: print varnode <varnode> More...
 
class  IfcPrintCover
 Print cover info about a HighVariable: print cover high <name> More...
 
class  IfcVarnodehighCover
 Print cover info about a HighVariable: print cover varnodehigh <varnode> More...
 
class  IfcPrintExtrapop
 Print change to stack pointer for called function: print extrapop [<functionname>] More...
 
class  IfcVarnodeCover
 Print cover information about a Varnode: print cover varnode <varnode> More...
 
class  IfcNameVarnode
 Attach a named symbol to a specific Varnode: name varnode <varnode> <name> More...
 
class  IfcTypeVarnode
 Attach a typed symbol to a specific Varnode: type varnode <varnode> <typedeclaration> More...
 
class  IfcForceHex
 Mark a constant to be printed in hex format: force hex <varnode> More...
 
class  IfcForceDec
 Mark a constant to be printed in decimal format: force dec <varnode> More...
 
class  IfcForcegoto
 Force a branch to be an unstructured goto: force goto <branchaddr> <targetaddr> More...
 
class  IfcProtooverride
 Override the prototype of a called function: override prototype <address> <declaration> More...
 
class  IfcJumpOverride
 Provide an overriding jump-table for an indirect branch: override jumptable ... More...
 
class  IfcFlowOverride
 Create a control-flow override: override flow <address> branch|call|callreturn|return More...
 
class  IfcDeadcodedelay
 Change when dead code elimination starts: deadcode delay <name> <delay> More...
 
class  IfcGlobalAdd
 Add a memory range as discoverable global variables: global add <address+size> More...
 
class  IfcGlobalRemove
 Remove a memory range from discoverable global variables: global remove <address+size> More...
 
class  IfcGlobalify
 Treat all normal memory as discoverable global variables: global spaces More...
 
class  IfcGlobalRegisters
 Name global registers: global registers More...
 
class  IfcPrintInputs
 Print info about the current function's input Varnodes: print inputs More...
 
class  IfcPrintInputsAll
 Print info about input Varnodes for all functions: print inputs all More...
 
class  IfcLockPrototype
 Lock in the current function's prototype: prototype lock More...
 
class  IfcUnlockPrototype
 Unlock the current function's prototype: prototype unlock More...
 
class  IfcPrintLocalrange
 Print range of locals on the stack: print localrange More...
 
class  IfcPrintMap
 Print info about a scope/namespace: print map <name> More...
 
class  IfcContinue
 Continue decompilation after a break point: continue More...
 
class  IfcPrintRaw
 Print the raw p-code for the current function: print raw More...
 
class  IfcGraphDataflow
 Write a graph representation of data-flow to a file: graph dataflow <filename> More...
 
class  IfcGraphControlflow
 Write a graph representation of control-flow to a file: graph controlflow <filename> More...
 
class  IfcGraphDom
 Write the forward dominance graph to a file: graph dom <filename> More...
 
class  IfcCommentInstr
 Attach a comment to an address: comment <address> comment text... More...
 
class  IfcDuplicateHash
 Check for duplicate hashes in functions: duplicate hash More...
 
class  IfcCallGraphDump
 Write the current call-graph to a file: callgraph dump <filename> More...
 
class  IfcCallGraphBuild
 Build the call-graph for the architecture/program: callgraph build More...
 
class  IfcCallGraphBuildQuick
 Build the call-graph using quick analysis: callgraph build quick More...
 
class  IfcCallGraphLoad
 Load the call-graph from a file: callgraph load <filename> More...
 
class  IfcCallGraphList
 List all functions in leaf order: callgraph list More...
 
class  IfcComment
 A comment within a command script: % A comment in a script More...
 
class  IfcCallFixup
 Add a new call fix-up to the program: fixup call ... More...
 
class  IfcCallOtherFixup
 Add a new callother fix-up to the program: fixup callother ... More...
 
class  IfcCountPcode
 Count p-code in the current function: count pcode More...
 
class  IfcPrintActionstats
 Print transform statistics for the decompiler engine: print actionstats More...
 
class  IfcResetActionstats
 Reset transform statistics for the decompiler engine: reset actionstats More...
 
class  IfcVolatile
 Mark a memory range as volatile: volatile <address+size> More...
 
class  IfcReadonly
 Mark a memory range as read-only: readonly <address+size> More...
 
class  IfcPreferSplit
 Mark a storage location to be split: prefersplit <address+size> <splitsize> More...
 
class  IfcStructureBlocks
 Structure an external control-flow graph: structure blocks <infile> <outfile> More...
 
class  IfcAnalyzeRange
 Run value-set analysis on the current function: analyze range full|partial <varnode> More...
 

Functions

void execute (IfaceStatus *status, IfaceDecompData *dcp)
 Execute one command for the console. More...
 
void mainloop (IfaceStatus *status)
 Execute commands as they become available. More...
 

Detailed Description

Console interface commands for the decompiler engine.

Function Documentation

◆ execute()

void execute ( IfaceStatus status,
IfaceDecompData dcp 
)

Execute one command for the console.

Execute one command and handle any exceptions. Error messages are printed to the console. For low-level errors, the current function is reset to null

Parameters
statusis the console interface
dcpis the shared program data

◆ mainloop()

void mainloop ( IfaceStatus status)

Execute commands as they become available.

Execution loops until either the done field in the console is set or if all streams have ended. This handles popping script states pushed on by the IfcSource command.

Parameters
statusis the console interface