Class DecompilerCallback<R>

java.lang.Object
ghidra.app.decompiler.parallel.DecompilerCallback<R>
Type Parameters:
R - the return type
All Implemented Interfaces:
QCallback<Function,R>

public abstract class DecompilerCallback<R> extends Object implements QCallback<Function,R>
An implementation of QCallback that performs the management of the DecompInterface instances using a Pool.

Clients will get a chance to configure each newly created decompiler via the passed-in DecompileConfigurer.

Clients must implement process(DecompileResults, TaskMonitor), which will be called for each function that is decompiled.

  • Constructor Details

  • Method Details

    • process

      public abstract R process(DecompileResults results, TaskMonitor monitor) throws Exception
      This is called when a function is decompiled.
      Parameters:
      results - the decompiled results
      monitor - the task monitor
      Returns:
      the client result
      Throws:
      Exception - if there is any issue processing the given results
    • process

      public R process(Function f, TaskMonitor monitor) throws Exception
      Description copied from interface: QCallback
      Processes the given item in background thread provided by a GThreadPool.
      Specified by:
      process in interface QCallback<Function,R>
      Parameters:
      f - the item to process.
      monitor - a monitor that can be used to check for cancellation and to report progress and transient messages.
      Returns:
      The return value resulting from processing the item.
      Throws:
      Exception
    • setTimeout

      public void setTimeout(int timeoutSecs)
      Sets the timeout for each decompile
      Parameters:
      timeoutSecs - the timeout in seconds
    • dispose

      public void dispose()
      Call this when all work is done so that the pooled decompilers can be disposed