Class ComposedPcodeEmulationCallbacks<T>

java.lang.Object
ghidra.pcode.emu.ComposedPcodeEmulationCallbacks<T>
Type Parameters:
T - the emulator's value domain
All Implemented Interfaces:
PcodeEmulationCallbacks<T>

public class ComposedPcodeEmulationCallbacks<T> extends Object implements PcodeEmulationCallbacks<T>
A mechanism for broadcasting (mostly) callbacks among several receivers.

The two (currently) methods that do not implement a pure broadcast pattern are handleMissingUserop(PcodeThread, PcodeOp, PcodeFrame, String, PcodeUseropLibrary) and readUninitialized(PcodeThread, PcodeExecutorStatePiece, AddressSetView). For a missing userop, it will terminate after the first delegate returns true, in which case it also returns true. If all delegates return false, then it returns false. For an uninitialized read, each delegate's returned "still-uninitialized" set is passed to the subsequent delegate. The first delegate gets the set as passed into the composition. The set returned by the composition is that returned by the last delegate. This terminates early when any delegate returns the empty set.

One (currently) other method has a non-void return type: readUninitialized(PcodeThread, PcodeExecutorStatePiece, AddressSpace, Object, int). The callback is broadcast as expected, and the return value is the max returned by the delegates.