public class Perturbator extends ListenerAdapter
Modifier and Type | Class and Description |
---|---|
static class |
Perturbator.FieldPerturbation |
static class |
Perturbator.ParamsPerturbation |
static class |
Perturbator.Perturbation |
static class |
Perturbator.ReturnPerturbation |
Modifier and Type | Field and Description |
---|---|
protected static Class<?>[] |
argTypes |
protected List<Perturbator.FieldPerturbation> |
fieldWatchList |
protected List<Perturbator.ParamsPerturbation> |
paramsWatchList |
protected HashMap<FieldInfo,Perturbator.FieldPerturbation> |
perturbedFields |
protected HashMap<MethodInfo,Perturbator.ParamsPerturbation> |
perturbedParams |
protected HashMap<MethodInfo,Perturbator.ReturnPerturbation> |
perturbedReturns |
protected List<Perturbator.ReturnPerturbation> |
returnWatchList |
protected StackFrame |
savedFrame |
Constructor and Description |
---|
Perturbator(Config conf) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFieldPerturbations(Perturbator.FieldPerturbation p,
ClassInfo ci,
FieldInfo[] fieldInfos) |
protected void |
addToFieldWatchList(Config conf,
String id) |
protected void |
addToParamsWatchList(Config conf,
String id) |
protected void |
addToReturnWatchList(Config conf,
String id) |
void |
classLoaded(VM vm,
ClassInfo loadedClass)
new class was loaded.
|
void |
executeInstruction(VM vm,
ThreadInfo ti,
Instruction insnToExecute)
VM is about to execute the next instruction
|
void |
instructionExecuted(VM vm,
ThreadInfo ti,
Instruction nextInsn,
Instruction executedInsn)
VM has executed the next instruction
(can be used to analyze branches, monitor PUTFIELD / GETFIELD and
INVOKExx / RETURN instructions)
|
protected boolean |
isMatchingInstructionLocation(Perturbator.Perturbation p,
Instruction insn) |
boolean |
isMethodWatched(Instruction insn,
MethodInfo mi) |
protected boolean |
isRelevantCallLocation(Instruction invokeInsn,
Perturbator.Perturbation p) |
protected boolean |
isRelevantCallLocation(ThreadInfo ti,
Perturbator.Perturbation p) |
choiceGeneratorAdvanced, choiceGeneratorProcessed, choiceGeneratorRegistered, choiceGeneratorSet, exceptionBailout, exceptionHandled, exceptionThrown, gcBegin, gcEnd, loadClass, methodEntered, methodExited, objectCreated, objectLocked, objectNotify, objectNotifyAll, objectReleased, objectUnlocked, objectWait, propertyViolated, publishConstraintHit, publishFinished, publishPropertyViolation, publishStart, publishTransition, searchConstraintHit, searchFinished, searchStarted, stateAdvanced, stateBacktracked, stateProcessed, statePurged, stateRestored, stateStored, threadBlocked, threadInterrupted, threadNotified, threadScheduled, threadStarted, threadTerminated, threadWaiting, vmInitialized
protected static Class<?>[] argTypes
protected List<Perturbator.FieldPerturbation> fieldWatchList
protected HashMap<FieldInfo,Perturbator.FieldPerturbation> perturbedFields
protected List<Perturbator.ReturnPerturbation> returnWatchList
protected HashMap<MethodInfo,Perturbator.ReturnPerturbation> perturbedReturns
protected List<Perturbator.ParamsPerturbation> paramsWatchList
protected HashMap<MethodInfo,Perturbator.ParamsPerturbation> perturbedParams
protected StackFrame savedFrame
public Perturbator(Config conf)
public boolean isMethodWatched(Instruction insn, MethodInfo mi)
public void classLoaded(VM vm, ClassInfo loadedClass)
VMListener
classLoaded
in interface VMListener
classLoaded
in class ListenerAdapter
protected void addFieldPerturbations(Perturbator.FieldPerturbation p, ClassInfo ci, FieldInfo[] fieldInfos)
protected boolean isRelevantCallLocation(ThreadInfo ti, Perturbator.Perturbation p)
protected boolean isRelevantCallLocation(Instruction invokeInsn, Perturbator.Perturbation p)
public void executeInstruction(VM vm, ThreadInfo ti, Instruction insnToExecute)
VMListener
executeInstruction
in interface VMListener
executeInstruction
in class ListenerAdapter
public void instructionExecuted(VM vm, ThreadInfo ti, Instruction nextInsn, Instruction executedInsn)
VMListener
instructionExecuted
in interface VMListener
instructionExecuted
in class ListenerAdapter
protected boolean isMatchingInstructionLocation(Perturbator.Perturbation p, Instruction insn)