Package ghidra.app.decompiler.parallel
Class ParallelDecompiler
java.lang.Object
ghidra.app.decompiler.parallel.ParallelDecompiler
-
Method Summary
Modifier and TypeMethodDescriptionstatic <R> ChunkingParallelDecompiler
<R> createChunkingParallelDecompiler
(QCallback<Function, R> callback, TaskMonitor monitor) Creates an object that can be used to perform decompilation of a limited number of functions at a time, as opposed to working over an entire range of functions at once.static <R> List
<R> decompileFunctions
(QCallback<Function, R> callback, Program program, AddressSetView addresses, TaskMonitor monitor) Decompile the given functions using multiple decompilersstatic <R> void
decompileFunctions
(QCallback<Function, R> callback, Program program, Iterator<Function> functions, Consumer<R> resultsConsumer, TaskMonitor monitor) Decompile the given functions using multiple decompilers.static <R> List
<R> decompileFunctions
(QCallback<Function, R> callback, Collection<Function> functions, TaskMonitor monitor) Decompile the given functions using multiple decompilers
-
Method Details
-
decompileFunctions
public static <R> List<R> decompileFunctions(QCallback<Function, R> callback, Program program, AddressSetView addresses, TaskMonitor monitor) throws InterruptedException, ExceptionDecompile the given functions using multiple decompilers- Parameters:
callback
- the callback to be called for each item that is processedprogram
- the programaddresses
- the addresses restricting which functions to decompilemonitor
- the task monitor- Returns:
- the list of client results
- Throws:
InterruptedException
- if interruptedException
- if any other exception occurs
-
decompileFunctions
public static <R> List<R> decompileFunctions(QCallback<Function, R> callback, Collection<Function> functions, TaskMonitor monitor) throws InterruptedException, ExceptionDecompile the given functions using multiple decompilers- Parameters:
callback
- the callback to be called for each item that is processedfunctions
- the functions to decompilemonitor
- the task monitor- Returns:
- the list of client results
- Throws:
InterruptedException
- if interruptedException
- if any other exception occurs
-
decompileFunctions
public static <R> void decompileFunctions(QCallback<Function, R> callback, Program program, Iterator<Function> functions, Consumer<R> resultsConsumer, TaskMonitor monitor) throws InterruptedException, ExceptionDecompile the given functions using multiple decompilers.Results will be passed to the given consumer as they are produced. Calling this method allows you to handle results as they are discovered.
This method will wait for all processing before returning.
- Parameters:
callback
- the callback to be called for each that is processedprogram
- the programfunctions
- the functions to decompileresultsConsumer
- the consumer to which results will be passedmonitor
- the task monitor- Throws:
InterruptedException
- if interruptedException
- if any other exception occurs
-
createChunkingParallelDecompiler
public static <R> ChunkingParallelDecompiler<R> createChunkingParallelDecompiler(QCallback<Function, R> callback, TaskMonitor monitor) Creates an object that can be used to perform decompilation of a limited number of functions at a time, as opposed to working over an entire range of functions at once.decompileFunctions(QCallback, Program, AddressSetView, TaskMonitor)
will create and tear down concurrent data structures on each use, making repeated calls less efficient. You would use this method when you wish to perform periodic work as results are returned and when using the callback mechanism is not sufficient such as when ordering of results is required.- Parameters:
callback
- the callback required to perform work.monitor
- the monitor used to report progress and to cancel- Returns:
- the parallel decompiler used for decompiling.
-