public interface ProcessControl
A highly experimental interface for process control and debug events. May not be sufficiently portable; for this reason it has been factored out from the CDebugger interface and support for it is optional.
The ProcessControl interface defines a process control and event model for debugging. When a process is attached to by the base Debugger, all threads in the target process are suspended. The ProcessControl interface allows resumption and re-suspension of the threads in the target process, setting of breakpoints, and reception of debugging events (breakpoint hit, signal received, etc.).
Debugging events are generated one at a time by the target process. They must be queued up by the underlying debugging mechanism so that an attempt to send a second debugging event blocks until the first has been serviced with a call to debugEventResume.
Modifier and Type | Method and Description |
---|---|
void |
clearBreakpoint(Address addr)
Clears a breakpoint at the given address.
|
void |
debugEventContinue()
Informs the target process to resume past this debug event.
|
DebugEvent |
debugEventPoll()
Polls for the presence of a debug event.
|
boolean |
isBreakpointSet(Address addr)
Indicates whether a breakpoint is set at the given address.
|
boolean |
isSuspended()
Indicates whether the target process is suspended.
|
void |
resume()
Resumes all threads in the target process.
|
void |
setBreakpoint(Address addr)
Sets a breakpoint at the given address.
|
void |
suspend()
Suspends all threads in the target process.
|
void suspend() throws DebuggerException
sun.jvm.hotspot.debugger.Debugger.attach(int)
. The application
should check for the presence of a debug event via
debugEventPoll() upon re-suspending the target process (if one
is not yet known to be present.)DebuggerException
void resume() throws DebuggerException
DebuggerException
boolean isSuspended() throws DebuggerException
DebuggerException
void setBreakpoint(Address addr) throws UnmappedAddressException, DebuggerException
void clearBreakpoint(Address addr) throws DebuggerException
DebuggerException
boolean isBreakpointSet(Address addr) throws DebuggerException
DebuggerException
DebugEvent debugEventPoll() throws DebuggerException
DebuggerException
void debugEventContinue() throws DebuggerException
DebuggerException
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.