Interface Stepper
- All Known Implementing Classes:
DebugStepper,NullStepper
public interface Stepper
Stepper is used to push snapshots of the decompiler state into
the Debugger/Viewer. Push/Pop calls should be wound around any serious
transformation performed during the decompiler's operation.
You can obtain an instance via stepper(), it is recommended
to store it in a private static final field, as you would a logger.
Created by covers1624 on 12/5/21.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic class -
Method Summary
Modifier and TypeMethodDescriptionvoidaddControlFlowGraph(String name, ControlFlowNode cfNode) voidAdd a step with a text info blob.voidAdd a step with a 2 part info blob, rendered as a diff.voidAdd a step wth a 2 part info blob.voidaddVariableLivenessGraph(String name, VariableLivenessGraph graph) getOpts()Get theDebugPrintOptionsfor this stepper.booleanvoidpopStep()Stops a transformation step.voidStops a non-content step.voidStarts a step in the current context.voidpushStep(String name, StepContextType contextType) Starts a step in the current context.voidpushStep(String name, StepContextType contextType, Stepper.CodeContext context) Starts a step in the current context.voidpushTiming(String name) Starts a non-content step.static Stepperstepper()Retrieve an instance of the stepper.voidtopLevelStep(String name, StepContextType contextType, Stepper.CodeContext context, Runnable r) Starts a top-level step.
-
Method Details
-
stepper
Retrieve an instance of the stepper.The value returned by this is valid for the entire application lifetime, and should usually be stored in a static final field.
Think of this like a Logger.getLogger() call.
- Returns:
- The stepper.
-
isEnabled
boolean isEnabled()- Returns:
- If step capture is enabled.
-
getOpts
DebugPrintOptions getOpts()Get theDebugPrintOptionsfor this stepper.- Returns:
- The
DebugPrintOptions.
-
pushStep
Starts a step in the current context.- Parameters:
name- A descriptive name for the step.
-
pushStep
Starts a step in the current context.- Parameters:
name- A descriptive name for the step.
-
pushStep
Starts a step in the current context.- Parameters:
name- A descriptive name for the step.
-
popStep
void popStep()Stops a transformation step. -
topLevelStep
void topLevelStep(String name, StepContextType contextType, Stepper.CodeContext context, Runnable r) Starts a top-level step.If the given runnable throws an exception, will correctly unwind the stepper tree state and attribute the error to the currently executing step.
- Parameters:
name- A descriptive name for the step.r- Runnable wrapper for exception tracking.
-
pushTiming
Starts a non-content step.- Parameters:
name- The name.
-
popTiming
void popTiming()Stops a non-content step. -
addInfo
Add a step with a text info blob.- Parameters:
name- The name.info- The info blob.
-
addInfo
Add a step with a 2 part info blob, rendered as a diff.- Parameters:
name- The name.left- The left info blob.right- The right info blob.
-
addInfoDiff
Add a step wth a 2 part info blob.- Parameters:
name- The name.left- The left info blob.right- The right info blob.
-
addVariableLivenessGraph
-
addControlFlowGraph
-