Package editor.debugger
Class Debugger
- java.lang.Object
-
- editor.debugger.Debugger
-
public class Debugger extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private boolean_bPausedprivate BreakpointManager_bpmprivate java.util.Map<java.lang.String,com.sun.jdi.request.ClassPrepareRequest>_classPrepareRequestsprivate ExperimentBuild_classRedefinerprivate java.lang.Thread_debuggerThreadprivate com.sun.jdi.event.EventIterator_eventIteratorprivate java.lang.String_eventNameprivate com.sun.jdi.event.EventSet_eventSetprivate com.sun.jdi.ThreadReference_eventThreadprivate java.util.List<java.util.function.Consumer<Debugger>>_listenersprivate com.sun.jdi.Location_locationprivate java.lang.Object_monitorprivate java.util.HashSet<com.sun.jdi.ObjectReference>_refsprivate boolean_temporarilySuspendedprivate com.sun.jdi.VirtualMachine_vmprivate boolean_vmExitprivate static java.lang.StringBACK_OUT_LOCATIONprivate static java.lang.StringFROM_LOCATIONprivate static java.lang.StringTEMPORARY
-
Constructor Summary
Constructors Constructor Description Debugger(com.sun.jdi.VirtualMachine vm, BreakpointManager bpm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBreakpointJdi(Breakpoint bp)private voidaddBreakpoints()voidaddChangeListener(java.util.function.Consumer<Debugger> listener)private voidaddPendingBreakpointFor(java.lang.String className)private voidassignSuspendedState(com.sun.jdi.event.LocatableEvent event, boolean temporary)private voidclearSuspendedState()private voidconsumeRemainingEvents()private com.sun.jdi.request.StepRequestcreateStep(com.sun.jdi.ThreadReference eventThread, int depth)private voiddeferAddVmBreakpoint(Breakpoint bp)voiddropToFrame(com.sun.jdi.StackFrame frame)ExperimentBuildgetClassRedefiner()java.lang.StringgetEventName()private com.sun.jdi.request.EventRequestManagergetEventRequestManager()private GosuPanelgetGosuPanel()static java.lang.StringgetOutermostType(com.sun.jdi.ReferenceType type)com.sun.jdi.LocationgetSuspendedLocation()com.sun.jdi.ThreadReferencegetSuspendedThread()java.util.List<com.sun.jdi.ThreadReference>getThreads()private voidhandleBreakpointEvent(com.sun.jdi.event.LocatableEvent event)private voidhandleClassPrepareEvent(com.sun.jdi.event.ClassPrepareEvent event)private voidhandleExceptionEvent(com.sun.jdi.event.ExceptionEvent event)private voidhandleStepEvent(com.sun.jdi.event.StepEvent event)private voidhandleSuspendLocatableEvent(com.sun.jdi.event.LocatableEvent event)private voidhandleVMDeathEvent()private voidhandleVMDisconnectEvent()private voidhandleVMStartEvent()private booleanisFirstFrame(com.sun.jdi.StackFrame frame)booleanisPaused()booleanisSuspended()voidmuteBreakpoints(boolean mute)private voidnotifyListeners()voidpause()private voidquit()voidredefineClasses(java.util.List<CompiledClass> listCompiledClasses)private voidreleaseRefs()voidremoveBreakpointJdi(Breakpoint bp)booleanremoveChangeListener(java.util.function.Consumer<Debugger> listener)private voidresumed(boolean silent)voidresumeExecution()private voidresumeProgram(boolean silent)voidretain(com.sun.jdi.ObjectReference ref)private voidrun()voidstartDebugging()private voidstep(int depth)voidstepInto()voidstepOut()voidstepOver()private voidstopDebugging(boolean bKill)private voidsuspended()java.lang.StringtoString()
-
-
-
Field Detail
-
TEMPORARY
private static final java.lang.String TEMPORARY
- See Also:
- Constant Field Values
-
FROM_LOCATION
private static final java.lang.String FROM_LOCATION
- See Also:
- Constant Field Values
-
BACK_OUT_LOCATION
private static final java.lang.String BACK_OUT_LOCATION
- See Also:
- Constant Field Values
-
_debuggerThread
private java.lang.Thread _debuggerThread
-
_bpm
private final BreakpointManager _bpm
-
_vm
private com.sun.jdi.VirtualMachine _vm
-
_eventSet
private com.sun.jdi.event.EventSet _eventSet
-
_vmExit
private boolean _vmExit
-
_location
private com.sun.jdi.Location _location
-
_eventThread
private com.sun.jdi.ThreadReference _eventThread
-
_classPrepareRequests
private java.util.Map<java.lang.String,com.sun.jdi.request.ClassPrepareRequest> _classPrepareRequests
-
_monitor
private final java.lang.Object _monitor
-
_bPaused
private boolean _bPaused
-
_listeners
private java.util.List<java.util.function.Consumer<Debugger>> _listeners
-
_eventName
private java.lang.String _eventName
-
_refs
private final java.util.HashSet<com.sun.jdi.ObjectReference> _refs
-
_temporarilySuspended
private boolean _temporarilySuspended
-
_eventIterator
private com.sun.jdi.event.EventIterator _eventIterator
-
_classRedefiner
private ExperimentBuild _classRedefiner
-
-
Constructor Detail
-
Debugger
public Debugger(com.sun.jdi.VirtualMachine vm, BreakpointManager bpm)
-
-
Method Detail
-
startDebugging
public void startDebugging()
-
resumeExecution
public void resumeExecution()
-
getSuspendedLocation
public com.sun.jdi.Location getSuspendedLocation()
-
getSuspendedThread
public com.sun.jdi.ThreadReference getSuspendedThread()
-
assignSuspendedState
private void assignSuspendedState(com.sun.jdi.event.LocatableEvent event, boolean temporary)
-
clearSuspendedState
private void clearSuspendedState()
-
addChangeListener
public void addChangeListener(java.util.function.Consumer<Debugger> listener)
-
removeChangeListener
public boolean removeChangeListener(java.util.function.Consumer<Debugger> listener)
-
notifyListeners
private void notifyListeners()
-
getEventName
public java.lang.String getEventName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
muteBreakpoints
public void muteBreakpoints(boolean mute)
-
run
private void run()
-
handleStepEvent
private void handleStepEvent(com.sun.jdi.event.StepEvent event)
-
getEventRequestManager
private com.sun.jdi.request.EventRequestManager getEventRequestManager()
-
handleBreakpointEvent
private void handleBreakpointEvent(com.sun.jdi.event.LocatableEvent event)
-
consumeRemainingEvents
private void consumeRemainingEvents()
-
handleExceptionEvent
private void handleExceptionEvent(com.sun.jdi.event.ExceptionEvent event)
-
handleVMStartEvent
private void handleVMStartEvent()
-
handleClassPrepareEvent
private void handleClassPrepareEvent(com.sun.jdi.event.ClassPrepareEvent event)
-
handleVMDeathEvent
private void handleVMDeathEvent()
-
handleVMDisconnectEvent
private void handleVMDisconnectEvent()
-
quit
private void quit()
-
handleSuspendLocatableEvent
private void handleSuspendLocatableEvent(com.sun.jdi.event.LocatableEvent event)
-
isSuspended
public boolean isSuspended()
-
stepOver
public void stepOver()
-
stepInto
public void stepInto()
-
stepOut
public void stepOut()
-
step
private void step(int depth)
-
createStep
private com.sun.jdi.request.StepRequest createStep(com.sun.jdi.ThreadReference eventThread, int depth)
-
isPaused
public boolean isPaused()
-
pause
public void pause()
-
dropToFrame
public void dropToFrame(com.sun.jdi.StackFrame frame)
-
isFirstFrame
private boolean isFirstFrame(com.sun.jdi.StackFrame frame) throws com.sun.jdi.IncompatibleThreadStateException- Throws:
com.sun.jdi.IncompatibleThreadStateException
-
addBreakpoints
private void addBreakpoints()
-
addBreakpointJdi
public void addBreakpointJdi(Breakpoint bp)
-
deferAddVmBreakpoint
private void deferAddVmBreakpoint(Breakpoint bp)
-
removeBreakpointJdi
public void removeBreakpointJdi(Breakpoint bp)
-
addPendingBreakpointFor
private void addPendingBreakpointFor(java.lang.String className)
-
resumeProgram
private void resumeProgram(boolean silent)
-
stopDebugging
private void stopDebugging(boolean bKill)
-
suspended
private void suspended()
-
resumed
private void resumed(boolean silent)
-
retain
public void retain(com.sun.jdi.ObjectReference ref)
-
releaseRefs
private void releaseRefs()
-
getOutermostType
public static java.lang.String getOutermostType(com.sun.jdi.ReferenceType type)
-
getGosuPanel
private GosuPanel getGosuPanel()
-
getThreads
public java.util.List<com.sun.jdi.ThreadReference> getThreads()
-
getClassRedefiner
public ExperimentBuild getClassRedefiner()
-
redefineClasses
public void redefineClasses(java.util.List<CompiledClass> listCompiledClasses)
-
-