Package ghidra.app.decompiler.flatapi
Class FlatDecompilerAPI
java.lang.Object
ghidra.app.decompiler.flatapi.FlatDecompilerAPI
- All Implemented Interfaces:
Disposable
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInitializes without a provided FlatProgramAPI instance...this must be set before using the FlatDecompilerAPI!FlatDecompilerAPI
(FlatProgramAPI flatProgramAPI) Initializes with a provided FlatProgramAPI instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Decompiles the specified function and returns a string containing the decompilation.final String
Decompiles the specified function and returns a string containing the decompilation.void
dispose()
Disposes of the decompiler resources by calling currentDecompiler.dispose().Gets the actual decompiler (may be null if not initialized).final void
Initializes the decompiler instance.
-
Field Details
-
flatProgramAPI
-
decompiler
-
-
Constructor Details
-
FlatDecompilerAPI
public FlatDecompilerAPI()Initializes without a provided FlatProgramAPI instance...this must be set before using the FlatDecompilerAPI! -
FlatDecompilerAPI
Initializes with a provided FlatProgramAPI instance.- Parameters:
flatProgramAPI
- the FlatProgramAPI instance.
-
-
Method Details
-
getDecompiler
Gets the actual decompiler (may be null if not initialized).- Returns:
- the decompiler
-
decompile
Decompiles the specified function and returns a string containing the decompilation. This call does not impose a timeout.- Parameters:
function
- the function to decompile- Returns:
- a string containing the decompilation
- Throws:
Exception
-
decompile
Decompiles the specified function and returns a string containing the decompilation.- Parameters:
function
- the function to decompiletimeoutSecs
- maximum time allowed for decompile to complete.- Returns:
- a string containing the decompilation
- Throws:
Exception
-
initialize
Initializes the decompiler instance.- Throws:
Exception
-
dispose
public void dispose()Disposes of the decompiler resources by calling currentDecompiler.dispose().- Specified by:
dispose
in interfaceDisposable
-