C# Class Reko.DecompilerDriver

The main driver class for decompilation of binaries.
This class is named this way as the previous name 'Decompiler' causes C# to get confused between the namespace and the class name.
Inheritance: IDecompiler
Afficher le fichier Open project: uxmal/reko

Méthodes publiques

Méthode Description
AnalyzeDataFlow ( ) : void

Determines the signature of the procedures, the locations and types of all the values in the program.

Assemble ( string fileName, Assembler asm ) : void
Decompile ( string filename ) : void

Main entry point of the decompiler. Loads, decompiles, and outputs the results.

DecompilerDriver ( ILoader ldr, IServiceProvider services ) : Reko.Core
DumpAssembler ( Program program, Reko.Core.Output.Formatter wr ) : void
Load ( string fileName ) : bool

Loads (or assembles) the decompiler project. If a binary file is specified instead, we create a simple project for the file.

LoadCallSignatures ( Program program, ICollection userCalls ) : FunctionType>.IDictionary
LoadRawImage ( string fileName, RawFileElement raw ) : Program
LoadRawImage ( string fileName, string arch, string platform, Address addrBase ) : Program

Loads a program into memory, but performs no relocations.

ReconstructTypes ( ) : void

Extracts type information from the typeless rewritten programs.

RunScriptOnProgramImage ( Program program, Script_v2 script ) : void
ScanProcedure ( Reko.Core.ProgramAddress paddr ) : Reko.Core.ProcedureBase

Starts a scan at address addr on the user's request.

ScanPrograms ( ) : void

Generates the control flow graph and finds executable code in each program.

StructureProgram ( ) : void

Extracts structured program constructs out of snarled goto nests, if possible. Since procedures are now independent of each other, this analysis is done one procedure at a time.

WriteDecompiledProcedures ( Program program, TextWriter w ) : void
WriteDecompiledTypes ( Program program, TextWriter w ) : void
WriteDecompilerProducts ( ) : void
WriteGlobals ( Program program, TextWriter w ) : void
WriteHeaderComment ( string filename, Program program, TextWriter w ) : void

Méthodes protégées

Méthode Description
CreateDefaultProject ( string fileName, Program program ) : Reko.Core.Project

Private Methods

Méthode Description
BuildImageMaps ( ) : void

Build image maps for each program in preparation of the scanning phase.

CreateScanner ( Program program ) : IScanner
EmitProgram ( Program program, DataFlowAnalysis dfa, TextWriter output ) : void
ScanProgram ( Program program ) : void

Method Details

AnalyzeDataFlow() public méthode

Determines the signature of the procedures, the locations and types of all the values in the program.
public AnalyzeDataFlow ( ) : void
Résultat void

Assemble() public méthode

public Assemble ( string fileName, Assembler asm ) : void
fileName string
asm Assembler
Résultat void

CreateDefaultProject() protected méthode

protected CreateDefaultProject ( string fileName, Program program ) : Reko.Core.Project
fileName string
program Program
Résultat Reko.Core.Project

Decompile() public méthode

Main entry point of the decompiler. Loads, decompiles, and outputs the results.
public Decompile ( string filename ) : void
filename string
Résultat void

DecompilerDriver() public méthode

public DecompilerDriver ( ILoader ldr, IServiceProvider services ) : Reko.Core
ldr ILoader
services IServiceProvider
Résultat Reko.Core

DumpAssembler() public méthode

public DumpAssembler ( Program program, Reko.Core.Output.Formatter wr ) : void
program Program
wr Reko.Core.Output.Formatter
Résultat void

Load() public méthode

Loads (or assembles) the decompiler project. If a binary file is specified instead, we create a simple project for the file.
public Load ( string fileName ) : bool
fileName string
Résultat bool

LoadCallSignatures() public méthode

public LoadCallSignatures ( Program program, ICollection userCalls ) : FunctionType>.IDictionary
program Program
userCalls ICollection
Résultat FunctionType>.IDictionary

LoadRawImage() public méthode

public LoadRawImage ( string fileName, RawFileElement raw ) : Program
fileName string
raw RawFileElement
Résultat Program

LoadRawImage() public méthode

Loads a program into memory, but performs no relocations.
public LoadRawImage ( string fileName, string arch, string platform, Address addrBase ) : Program
fileName string
arch string
platform string
addrBase Address
Résultat Program

ReconstructTypes() public méthode

Extracts type information from the typeless rewritten programs.
public ReconstructTypes ( ) : void
Résultat void

RunScriptOnProgramImage() public méthode

public RunScriptOnProgramImage ( Program program, Script_v2 script ) : void
program Program
script Script_v2
Résultat void

ScanProcedure() public méthode

Starts a scan at address addr on the user's request.
public ScanProcedure ( Reko.Core.ProgramAddress paddr ) : Reko.Core.ProcedureBase
paddr Reko.Core.ProgramAddress
Résultat Reko.Core.ProcedureBase

ScanPrograms() public méthode

Generates the control flow graph and finds executable code in each program.
public ScanPrograms ( ) : void
Résultat void

StructureProgram() public méthode

Extracts structured program constructs out of snarled goto nests, if possible. Since procedures are now independent of each other, this analysis is done one procedure at a time.
public StructureProgram ( ) : void
Résultat void

WriteDecompiledProcedures() public méthode

public WriteDecompiledProcedures ( Program program, TextWriter w ) : void
program Program
w System.IO.TextWriter
Résultat void

WriteDecompiledTypes() public méthode

public WriteDecompiledTypes ( Program program, TextWriter w ) : void
program Program
w System.IO.TextWriter
Résultat void

WriteDecompilerProducts() public méthode

public WriteDecompilerProducts ( ) : void
Résultat void

WriteGlobals() public méthode

public WriteGlobals ( Program program, TextWriter w ) : void
program Program
w System.IO.TextWriter
Résultat void

WriteHeaderComment() public méthode

public WriteHeaderComment ( string filename, Program program, TextWriter w ) : void
filename string
program Program
w System.IO.TextWriter
Résultat void