Documentation
¶
Overview ¶
Package jdwp implements types to communicate using the the Java Debug Wire Protocol.
Index ¶
- Constants
- type ArrayID
- type ArrayTypeID
- type Char
- type ClassExcludeEventModifier
- type ClassID
- type ClassInfo
- type ClassLoaderID
- type ClassMatchEventModifier
- type ClassObjectID
- type ClassOnlyEventModifier
- type ClassStatus
- type Connection
- func (c *Connection) ClearEvent(kind EventKind, id EventRequestID) error
- func (c *Connection) CreateString(str string) (StringID, error)
- func (c *Connection) DisableGC(object ObjectID) error
- func (c *Connection) EnableGC(object ObjectID) error
- func (c *Connection) GetAllClasses() ([]ClassInfo, error)
- func (c *Connection) GetAllThreads() ([]ThreadID, error)
- func (c *Connection) GetArrayLength(id ArrayID) (int, error)
- func (c *Connection) GetArrayValues(id ArrayID, first, length int) ([]Value, error)
- func (c *Connection) GetClassBySignature(signature string) (ClassInfo, error)
- func (c *Connection) GetClassMethod(class ClassID, name, signature string) (Method, error)
- func (c *Connection) GetClassesBySignature(signature string) ([]ClassInfo, error)
- func (c *Connection) GetFieldValues(obj ObjectID, fields ...FieldID) ([]Value, error)
- func (c *Connection) GetFields(ty ReferenceTypeID) (Fields, error)
- func (c *Connection) GetFrames(thread ThreadID, start, count int) ([]FrameInfo, error)
- func (c *Connection) GetIDSizes() (IDSizes, error)
- func (c *Connection) GetImplemented(ty ReferenceTypeID) ([]InterfaceID, error)
- func (c *Connection) GetLocationMethodName(l Location) (string, error)
- func (c *Connection) GetMethods(ty ReferenceTypeID) (Methods, error)
- func (c *Connection) GetObjectType(object ObjectID) (ObjectType, error)
- func (c *Connection) GetStaticFieldValues(ty ReferenceTypeID, fields ...FieldID) ([]Value, error)
- func (c *Connection) GetString(id StringID) (string, error)
- func (c *Connection) GetSuperClass(class ClassID) (ClassID, error)
- func (c *Connection) GetThisObject(thread ThreadID, frame FrameID) (TaggedObjectID, error)
- func (c *Connection) GetTypeSignature(ty ReferenceTypeID) (string, error)
- func (c *Connection) GetValues(thread ThreadID, frame FrameID, slots []VariableRequest) ([]Value, error)
- func (c *Connection) GetVersion() (Version, error)
- func (c *Connection) InvokeMethod(object ObjectID, class ClassID, method MethodID, thread ThreadID, ...) (InvokeResult, error)
- func (c *Connection) InvokeStaticMethod(class ClassID, method MethodID, thread ThreadID, options InvokeOptions, ...) (InvokeResult, error)
- func (c *Connection) NewArray(ty ArrayTypeID, length int) (TaggedObjectID, error)
- func (c *Connection) NewInstance(class ClassID, constructor MethodID, thread ThreadID, options InvokeOptions, ...) (NewInstanceResult, error)
- func (c *Connection) Resume(id ThreadID) error
- func (c *Connection) ResumeAll() error
- func (c *Connection) SetArrayValues(id ArrayID, first int, values interface{}) error
- func (c *Connection) SetEvent(kind EventKind, suspendPolity SuspendPolicy, modifiers ...EventModifier) (EventRequestID, error)
- func (c *Connection) SetValues(thread ThreadID, frame FrameID, slots []VariableAssignmentRequest) error
- func (c *Connection) Suspend(id ThreadID) error
- func (c *Connection) SuspendAll() error
- func (c *Connection) VariableTable(classTy ReferenceTypeID, method MethodID) (VariableTable, error)
- func (c *Connection) WaitForClassPrepare(ctx context.Context, pattern string) (ThreadID, error)
- func (c *Connection) WaitForMethodEntry(ctx context.Context, class ClassID, method MethodID, wakeup ThreadID) (*EventMethodEntry, error)
- func (c *Connection) WatchEvents(ctx context.Context, cb OnEvent)
- type CountEventModifier
- type Error
- type Event
- type EventBreakpoint
- type EventClassPrepare
- type EventClassUnload
- type EventException
- type EventFieldAccess
- type EventFieldModification
- type EventKind
- type EventMethodEntry
- type EventMethodExit
- type EventModifier
- type EventRequestID
- type EventSingleStep
- type EventThreadDeath
- type EventThreadStart
- type EventVMDeath
- type EventVMStart
- type Events
- type ExceptionOnlyEventModifier
- type Field
- type FieldID
- type FieldOnlyEventModifier
- type Fields
- type FrameID
- type FrameInfo
- type FrameVariable
- type IDSizes
- type InstanceOnlyEventModifier
- type InterfaceID
- type InvokeOptions
- type InvokeResult
- type Location
- type LocationOnlyEventModifier
- type Method
- type MethodID
- type Methods
- type ModBits
- func (m ModBits) Abstract() bool
- func (m ModBits) Final() bool
- func (m ModBits) Interface() bool
- func (m ModBits) Native() bool
- func (m ModBits) Private() bool
- func (m ModBits) Protected() bool
- func (m ModBits) Public() bool
- func (m ModBits) Static() bool
- func (m ModBits) Strict() bool
- func (m ModBits) String() string
- func (m ModBits) Synchronized() bool
- func (m ModBits) Transient() bool
- func (m ModBits) Volatile() bool
- type NewInstanceResult
- type Object
- type ObjectID
- type ObjectType
- type OnEvent
- type ReferenceTypeID
- type StepEventModifier
- type StringID
- type SuspendPolicy
- type Tag
- type TaggedObjectID
- type ThreadGroupID
- type ThreadID
- type ThreadOnlyEventModifier
- type TypeTag
- type Value
- type ValueSlice
- type VariableAssignmentRequest
- type VariableRequest
- type VariableTable
- type Version
Constants ¶
const ( // StatusVerified is used to describe a class in the verified state. StatusVerified = ClassStatus(1) // StatusPrepared is used to describe a class in the prepared state. StatusPrepared = ClassStatus(2) // StatusInitialized is used to describe a class in the initialized state. StatusInitialized = ClassStatus(4) // StatusError is used to describe a class in the error state. StatusError = ClassStatus(8) )
const ( ErrNone = Error(0) ErrInvalidThread = Error(10) ErrInvalidThreadGroup = Error(11) ErrInvalidPriority = Error(12) ErrThreadNotSuspended = Error(13) ErrThreadSuspended = Error(14) ErrInvalidObject = Error(20) ErrInvalidClass = Error(21) ErrClassNotPrepared = Error(22) ErrInvalidMethodID = Error(23) ErrInvalidLocation = Error(24) ErrInvalidFieldID = Error(25) ErrInvalidFrameID = Error(30) ErrNoMoreFrames = Error(31) ErrOpaqueFrame = Error(32) ErrNotCurrentFrame = Error(33) ErrTypeMismatch = Error(34) ErrInvalidSlot = Error(35) ErrDuplicate = Error(40) ErrNotFound = Error(41) ErrInvalidMonitor = Error(50) ErrNotMonitorOwner = Error(51) ErrInterrupt = Error(52) ErrInvalidClassFormat = Error(60) ErrCircularClassDefinition = Error(61) ErrFailsVerification = Error(62) ErrAddMethodNotImplemented = Error(63) ErrSchemaChangeNotImplemented = Error(64) ErrInvalidTypestate = Error(65) ErrHierarchyChangeNotImplemented = Error(66) ErrDeleteMethodNotImplemented = Error(67) ErrUnsupportedVersion = Error(68) ErrNamesDontMatch = Error(69) ErrClassModifiersChangeNotImplemented = Error(70) ErrMethodModifiersChangeNotImplemented = Error(71) ErrNotImplemented = Error(99) ErrNullPointer = Error(100) ErrAbsentInformation = Error(101) ErrInvalidEventType = Error(102) ErrIllegalArgument = Error(103) ErrOutOfMemory = Error(110) ErrAccessDenied = Error(111) ErrVMDead = Error(112) ErrInternal = Error(113) ErrUnattachedThread = Error(115) ErrInvalidTag = Error(500) ErrAlreadyInvoking = Error(502) ErrInvalidIndex = Error(503) ErrInvalidLength = Error(504) ErrInvalidString = Error(506) ErrInvalidClassLoader = Error(507) ErrInvalidArray = Error(508) ErrTransportLoad = Error(509) ErrTransportInit = Error(510) ErrNativeMethod = Error(511) ErrInvalidCount = Error(512) )
const ( // SingleStep is the kind of event raised when a single-step has been completed. SingleStep = EventKind(1) // Breakpoint is the kind of event raised when a breakpoint has been hit. Breakpoint = EventKind(2) // FramePop is the kind of event raised when a stack-frame is popped. FramePop = EventKind(3) // Exception is the kind of event raised when an exception is thrown. Exception = EventKind(4) // UserDefined is the kind of event raised when a user-defind event is fired. UserDefined = EventKind(5) // ThreadStart is the kind of event raised when a new thread is started. ThreadStart = EventKind(6) // ThreadDeath is the kind of event raised when a thread is stopped. ThreadDeath = EventKind(7) // ClassPrepare is the kind of event raised when a class enters the prepared state. ClassPrepare = EventKind(8) // ClassUnload is the kind of event raised when a class is unloaded. ClassUnload = EventKind(9) // ClassLoad is the kind of event raised when a class enters the loaded state. ClassLoad = EventKind(10) // FieldAccess is the kind of event raised when a field is accessed. FieldAccess = EventKind(20) // FieldModification is the kind of event raised when a field is modified. FieldModification = EventKind(21) // ExceptionCatch is the kind of event raised when an exception is caught. ExceptionCatch = EventKind(30) // MethodEntry is the kind of event raised when a method has been entered. MethodEntry = EventKind(40) // MethodExit is the kind of event raised when a method has been exited. MethodExit = EventKind(41) // VMStart is the kind of event raised when the virtual machine is initialized. VMStart = EventKind(90) // VMDeath is the kind of event raised when the virtual machine is shutdown. VMDeath = EventKind(99) )
const ( // InvokeSingleThreaded prevents the resume of all other threads when // performing the invoke. Once the invoke has finished, the single thread will // suspended again. InvokeSingleThreaded = InvokeOptions(1) // InvokeNonvirtual invokes the method without using regular, virtual // invocation. InvokeNonvirtual = InvokeOptions(2) )
const ( ModPublic = ModBits(1) ModPrivate = ModBits(2) ModProtected = ModBits(4) ModStatic = ModBits(8) ModFinal = ModBits(16) ModSynchronized = ModBits(32) ModVolatile = ModBits(64) ModTransient = ModBits(128) ModInterface = ModBits(512) ModNative = ModBits(256) ModAbstract = ModBits(1024) ModStrict = ModBits(2048) )
const ( // SuspendNone suspends no threads when a event is raised. SuspendNone = SuspendPolicy(0) // SuspendEventThread suspends only the event's thread when a event is raised. SuspendEventThread = SuspendPolicy(1) // SuspendAll suspends all threads when a event is raised. SuspendAll = SuspendPolicy(2) )
const ( TagArray = Tag(91) // '[' - an array object (objectID size). TagByte = Tag(66) // 'B' - a byte value (1 byte). TagChar = Tag(67) // 'C' - a character value (2 bytes). TagObject = Tag(76) // 'L' - an object (objectID size). TagFloat = Tag(70) // 'F' - a float value (4 bytes). TagDouble = Tag(68) // 'D' - a double value (8 bytes). TagInt = Tag(73) // 'I' - an int value (4 bytes). TagLong = Tag(74) // 'J' - a long value (8 bytes). TagShort = Tag(83) // 'S' - a short value (2 bytes). TagVoid = Tag(86) // 'V' - a void value (no bytes). TagBoolean = Tag(90) // 'Z' - a boolean value (1 byte). TagString = Tag(115) // 's' - a String object (objectID size). TagThread = Tag(116) // 't' - a Thread object (objectID size). TagThreadGroup = Tag(103) // 'g' - a ThreadGroup object (objectID size). TagClassLoader = Tag(108) // 'l' - a ClassLoader object (objectID size). TagClassObject = Tag(99) // 'c' - a class object object (objectID size). )
const ( Class = TypeTag(1) // Type is a class. Interface = TypeTag(2) // Type is an interface. Array = TypeTag(3) // Type is an array. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayID ¶
type ArrayID uint64
ArrayID is an array instance identifier. ArrayID can always be safely cast to the less specific ObjectID.
type ArrayTypeID ¶
type ArrayTypeID uint64
ArrayTypeID is an array reference type identifier. ArrayTypeID can always be safely cast to the less specific ReferenceTypeID.
func (ArrayTypeID) String ¶
func (i ArrayTypeID) String() string
type ClassExcludeEventModifier ¶
type ClassExcludeEventModifier string
ClassExcludeEventModifier is an EventModifier that filters the events to those that are not associated with class names that match the pattern. See ClassMatchEventModifier for the permitted patterns.
type ClassID ¶
type ClassID uint64
ClassID is a class reference type identifier. ClassID can always be safely cast to the less specific ReferenceTypeID.
type ClassInfo ¶
type ClassInfo struct { Kind TypeTag // Kind of reference type TypeID ReferenceTypeID // Matching loaded reference type Signature string // The class signature Status ClassStatus // The class status }
ClassInfo describes a loaded classes matching the requested signature.
type ClassLoaderID ¶
type ClassLoaderID uint64
ClassLoaderID is class loader identifier. ClassLoaderID can always be safely cast to the less specific ObjectID.
func (ClassLoaderID) ID ¶
func (i ClassLoaderID) ID() ObjectID
ID returns the ClassLoaderID as an ObjectID
func (ClassLoaderID) String ¶
func (i ClassLoaderID) String() string
type ClassMatchEventModifier ¶
type ClassMatchEventModifier string
ClassMatchEventModifier is an EventModifier that filters the events to those that are associated with class names that match the pattern. The pattern can be an exact class name match, for use a '*' wildcard at the start or end of the string. Examples: • "java.lang.String" • "*.String" • "java.lang.*"
type ClassObjectID ¶
type ClassObjectID uint64
ClassObjectID is a class object instance identifier. ClassObjectID can always be safely cast to the less specific ObjectID.
func (ClassObjectID) ID ¶
func (i ClassObjectID) ID() ObjectID
ID returns the ClassObjectID as an ObjectID
func (ClassObjectID) String ¶
func (i ClassObjectID) String() string
type ClassOnlyEventModifier ¶
type ClassOnlyEventModifier ClassID
ClassOnlyEventModifier is an EventModifier that filters the events to those that are associated with the specified class.
type ClassStatus ¶
type ClassStatus int
ClassStatus is an enumerator of class loading state. See https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html#jvms-5.3 for detailed descriptions of the loading states.
func (ClassStatus) String ¶
func (c ClassStatus) String() string
type Connection ¶
Connection represents a JDWP connection.
func Open ¶
func Open(ctx context.Context, conn io.ReadWriteCloser) (*Connection, error)
Open creates a Connection using conn for I/O.
func (*Connection) ClearEvent ¶
func (c *Connection) ClearEvent(kind EventKind, id EventRequestID) error
ClearEvent cancels an event request.
func (*Connection) CreateString ¶
func (c *Connection) CreateString(str string) (StringID, error)
CreateString returns the StringID for the given string.
func (*Connection) DisableGC ¶
func (c *Connection) DisableGC(object ObjectID) error
DisableGC disables garbage collection for the specified object.
func (*Connection) EnableGC ¶
func (c *Connection) EnableGC(object ObjectID) error
EnableGC enables garbage collection for the specified object.
func (*Connection) GetAllClasses ¶
func (c *Connection) GetAllClasses() ([]ClassInfo, error)
GetAllClasses returns all the active threads by ID.
func (*Connection) GetAllThreads ¶
func (c *Connection) GetAllThreads() ([]ThreadID, error)
GetAllThreads returns all the active threads by ID.
func (*Connection) GetArrayLength ¶
func (c *Connection) GetArrayLength(id ArrayID) (int, error)
GetArrayLength returns the length of the specified array.
func (*Connection) GetArrayValues ¶
func (c *Connection) GetArrayValues(id ArrayID, first, length int) ([]Value, error)
GetArrayValues the values of the specified array.
func (*Connection) GetClassBySignature ¶
func (c *Connection) GetClassBySignature(signature string) (ClassInfo, error)
GetClassBySignature returns the single loaded class matching the requested signature from the server. If there are no, or more than one class found, then an error is returned.
func (*Connection) GetClassMethod ¶
func (c *Connection) GetClassMethod(class ClassID, name, signature string) (Method, error)
GetClassMethod looks up the method with the specified signature on class.
func (*Connection) GetClassesBySignature ¶
func (c *Connection) GetClassesBySignature(signature string) ([]ClassInfo, error)
GetClassesBySignature returns all the loaded classes matching the requested signature from the server.
func (*Connection) GetFieldValues ¶ added in v0.5.0
func (c *Connection) GetFieldValues(obj ObjectID, fields ...FieldID) ([]Value, error)
GetFieldValues returns the values of all the instance fields.
func (*Connection) GetFields ¶
func (c *Connection) GetFields(ty ReferenceTypeID) (Fields, error)
GetFields returns all the fields for the specified type.
func (*Connection) GetFrames ¶
func (c *Connection) GetFrames(thread ThreadID, start, count int) ([]FrameInfo, error)
GetFrames returns a number of stack frames.
func (*Connection) GetIDSizes ¶
func (c *Connection) GetIDSizes() (IDSizes, error)
GetIDSizes returns the sizes of all the variably sized data types.
func (*Connection) GetImplemented ¶
func (c *Connection) GetImplemented(ty ReferenceTypeID) ([]InterfaceID, error)
GetImplemented returns all the direct interfaces implemented by the specified type.
func (*Connection) GetLocationMethodName ¶
func (c *Connection) GetLocationMethodName(l Location) (string, error)
GetLocationMethodName returns the name of the method from the location.
func (*Connection) GetMethods ¶
func (c *Connection) GetMethods(ty ReferenceTypeID) (Methods, error)
GetMethods returns all the methods for the specified type.
func (*Connection) GetObjectType ¶
func (c *Connection) GetObjectType(object ObjectID) (ObjectType, error)
GetObjectType returns the type of the specified object.
func (*Connection) GetStaticFieldValues ¶
func (c *Connection) GetStaticFieldValues(ty ReferenceTypeID, fields ...FieldID) ([]Value, error)
GetStaticFieldValues returns the values of all the requests static fields.
func (*Connection) GetString ¶
func (c *Connection) GetString(id StringID) (string, error)
GetString returns the string text for the given StringID.
func (*Connection) GetSuperClass ¶
func (c *Connection) GetSuperClass(class ClassID) (ClassID, error)
GetSuperClass returns the immediate super class of the specified class.
func (*Connection) GetThisObject ¶
func (c *Connection) GetThisObject(thread ThreadID, frame FrameID) (TaggedObjectID, error)
GetThisObject returns the this object for the specified thread and stack frame.
func (*Connection) GetTypeSignature ¶
func (c *Connection) GetTypeSignature(ty ReferenceTypeID) (string, error)
GetTypeSignature returns the Java type signature for the specified type.
func (*Connection) GetValues ¶
func (c *Connection) GetValues(thread ThreadID, frame FrameID, slots []VariableRequest) ([]Value, error)
GetValues returns the set of objects for the specified thread and frame, based on their slots.
func (*Connection) GetVersion ¶
func (c *Connection) GetVersion() (Version, error)
GetVersion returns the JDWP version from the server.
func (*Connection) InvokeMethod ¶
func (c *Connection) InvokeMethod(object ObjectID, class ClassID, method MethodID, thread ThreadID, options InvokeOptions, args ...Value) (InvokeResult, error)
InvokeMethod invokes the specified static method.
func (*Connection) InvokeStaticMethod ¶
func (c *Connection) InvokeStaticMethod(class ClassID, method MethodID, thread ThreadID, options InvokeOptions, args ...Value) (InvokeResult, error)
InvokeStaticMethod invokes the specified static method.
func (*Connection) NewArray ¶
func (c *Connection) NewArray(ty ArrayTypeID, length int) (TaggedObjectID, error)
NewArray constructs a new array of the specified type and length.
func (*Connection) NewInstance ¶
func (c *Connection) NewInstance(class ClassID, constructor MethodID, thread ThreadID, options InvokeOptions, args ...Value) (NewInstanceResult, error)
NewInstance invokes the specified constructor.
func (*Connection) Resume ¶
func (c *Connection) Resume(id ThreadID) error
Resume resumes the specified thread.
func (*Connection) ResumeAll ¶
func (c *Connection) ResumeAll() error
ResumeAll resumes all threads.
func (*Connection) SetArrayValues ¶
func (c *Connection) SetArrayValues(id ArrayID, first int, values interface{}) error
SetArrayValues the values of the specified array.
func (*Connection) SetEvent ¶
func (c *Connection) SetEvent(kind EventKind, suspendPolity SuspendPolicy, modifiers ...EventModifier) (EventRequestID, error)
SetEvent sets an event request.
func (*Connection) SetValues ¶
func (c *Connection) SetValues(thread ThreadID, frame FrameID, slots []VariableAssignmentRequest) error
SetValues sets the values for the local variables given thread and frame
func (*Connection) Suspend ¶
func (c *Connection) Suspend(id ThreadID) error
Suspend suspends the specified thread.
func (*Connection) SuspendAll ¶
func (c *Connection) SuspendAll() error
SuspendAll suspends all threads.
func (*Connection) VariableTable ¶
func (c *Connection) VariableTable(classTy ReferenceTypeID, method MethodID) (VariableTable, error)
VariableTable returns all of the variables that are present in the given Method.
func (*Connection) WaitForClassPrepare ¶
WaitForClassPrepare blocks until a class with a name that matches the pattern is prepared, and then returns the thread that prepared the class.
func (*Connection) WaitForMethodEntry ¶
func (c *Connection) WaitForMethodEntry(ctx context.Context, class ClassID, method MethodID, wakeup ThreadID) (*EventMethodEntry, error)
WaitForMethodEntry blocks until the method on class is entered, and then returns the method entry event. The thread is suspended when the method returns. If wakeup is not 0, then the given thread is resumed before we wait for the method.
func (*Connection) WatchEvents ¶
func (c *Connection) WatchEvents(ctx context.Context, cb OnEvent)
WatchEvents calls cb each time a new event arrives. WatchEvents will block until cb returns false, or the ctx is cancelled.
type CountEventModifier ¶
type CountEventModifier int
CountEventModifier is an EventModifier that limits the number of times an event is fired. For example, using a CountEventModifier of 2 will only let two events fire.
type Event ¶
type Event interface {
Kind() EventKind
}
Event is the interface implemented by all events raised by the VM.
type EventBreakpoint ¶
type EventBreakpoint struct { Request EventRequestID Thread ThreadID Location Location }
EventBreakpoint represents an event raised when a breakpoint has been hit.
type EventClassPrepare ¶
type EventClassPrepare struct { Request EventRequestID Thread ThreadID ClassKind TypeTag ClassType ReferenceTypeID Signature string Status ClassStatus }
EventClassPrepare represents an event raised when a class enters the prepared state.
type EventClassUnload ¶
type EventClassUnload struct { Request EventRequestID Signature string }
EventClassUnload represents an event raised when a class is unloaded.
type EventException ¶
type EventException struct { Request EventRequestID Thread ThreadID Location Location Exception TaggedObjectID CatchLocation Location }
EventException represents an event raised when an exception is thrown.
type EventFieldAccess ¶
type EventFieldAccess struct { Request EventRequestID Thread ThreadID Location Location FieldKind TypeTag FieldType ReferenceTypeID Field FieldID Object TaggedObjectID }
EventFieldAccess represents an event raised when a field is accessed.
type EventFieldModification ¶
type EventFieldModification struct { Request EventRequestID Thread ThreadID Location Location FieldKind TypeTag FieldType ReferenceTypeID Field FieldID Object TaggedObjectID NewValue Value }
EventFieldModification represents an event raised when a field is modified.
func (EventFieldModification) Kind ¶
func (EventFieldModification) Kind() EventKind
Kind returns FieldModification
type EventKind ¶
type EventKind uint8
EventKind represents the type of event to set, or being raised.
type EventMethodEntry ¶
type EventMethodEntry struct { Request EventRequestID Thread ThreadID Location Location }
EventMethodEntry represents an event raised when a method has been entered.
type EventMethodExit ¶
type EventMethodExit struct { Request EventRequestID Thread ThreadID Location Location }
EventMethodExit represents an event raised when a method has been exited.
type EventModifier ¶
type EventModifier interface {
// contains filtered or unexported methods
}
EventModifier is the interface implemented by all event modifier types. These are filters on the events that are raised. See http://docs.oracle.com/javase/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html#JDWP_EventRequest_Set for detailed descriptions and rules for each of the EventModifiers.
type EventSingleStep ¶
type EventSingleStep struct { Request EventRequestID Thread ThreadID Location Location }
EventSingleStep represents an event raised when a single-step has been completed.
type EventThreadDeath ¶
type EventThreadDeath struct { Request EventRequestID Thread ThreadID }
EventThreadDeath represents an event raised when a thread is stopped.
type EventThreadStart ¶
type EventThreadStart struct { Request EventRequestID Thread ThreadID }
EventThreadStart represents an event raised when a new thread is started.
type EventVMDeath ¶
type EventVMDeath struct {
Request EventRequestID
}
EventVMDeath represents an event raised when the virtual machine is stopped.
type EventVMStart ¶
type EventVMStart struct { Request EventRequestID Thread ThreadID }
EventVMStart represents an event raised when the virtual machine is started.
type Events ¶
type Events struct { SuspendPolicy SuspendPolicy Events []Event }
Events is a collection of events.
type ExceptionOnlyEventModifier ¶
type ExceptionOnlyEventModifier struct { ExceptionOrNull ReferenceTypeID // If not nil, only permit exceptions of this type. Caught bool // Report caught exceptions Uncaught bool // Report uncaught exceptions }
ExceptionOnlyEventModifier is an EventModifier that filters exception events. Can only be used for exception events.
type FieldID ¶
type FieldID uint64
FieldID is the identifier for a single method for a class or interface.
type FieldOnlyEventModifier ¶
type FieldOnlyEventModifier struct { Type ReferenceTypeID Field FieldID }
FieldOnlyEventModifier is an EventModifier that filters events to those relating to the specified field. Can only be used for field access or field modified events.
type Fields ¶
type Fields []Field
Fields is a collection of fields
func (Fields) FindByID ¶
FindByID returns the field with the matching identifier in l, or nil if no field with a matching identifier is found in l.
func (Fields) FindByName ¶
FindByName returns the field with the matching name, or nil if no field with a matching name is found in l.
func (Fields) FindBySignature ¶
FindBySignature returns the field with the matching signature in l, or nil if no field with a matching signature is found in l.
type FrameVariable ¶
FrameVariable contains all of the information a single variable.
type IDSizes ¶
type IDSizes struct { FieldIDSize int32 // FieldID size in bytes MethodIDSize int32 // MethodID size in bytes ObjectIDSize int32 // ObjectID size in bytes ReferenceTypeIDSize int32 // ReferenceTypeID size in bytes FrameIDSize int32 // FrameID size in bytes }
IDSizes describes the sizes of all the variably sized data types.
type InstanceOnlyEventModifier ¶
type InstanceOnlyEventModifier ObjectID
InstanceOnlyEventModifier is an EventModifier that filters events to those which have the specified 'this' object.
type InterfaceID ¶
type InterfaceID uint64
InterfaceID is an interface reference type identifier. InterfaceID can always be safely cast to the less specific ReferenceTypeID.
func (InterfaceID) String ¶
func (i InterfaceID) String() string
type InvokeOptions ¶
type InvokeOptions int
InvokeOptions is a collection of bit flags controlling an invoke.
func (InvokeOptions) String ¶
func (i InvokeOptions) String() string
type InvokeResult ¶
type InvokeResult struct { Result Value Exception TaggedObjectID }
InvokeResult holds the return values for a method invokation.
type LocationOnlyEventModifier ¶
type LocationOnlyEventModifier Location
LocationOnlyEventModifier is an EventModifier that filters the events to those that only originate at the specified location.
type MethodID ¶
type MethodID uint64
MethodID is the identifier for a single method for a class or interface.
type Methods ¶
type Methods []Method
Methods is a collection of methods
func (Methods) FindByID ¶
FindByID returns the method with the matching identifier in l, or nil if no method with a matching identifier is found in l.
func (Methods) FindBySignature ¶
FindBySignature returns the method with the matching signature in l, or nil if no method with a matching signature is found in l.
type ModBits ¶
type ModBits int
ModBits represents the modifier bitflags for a class, method or field.
func (ModBits) Synchronized ¶
type NewInstanceResult ¶
type NewInstanceResult struct { Result TaggedObjectID Exception TaggedObjectID }
NewInstanceResult holds the return values for a constructor invokation.
type Object ¶
type Object interface {
ID() ObjectID
}
Object is the interface implemented by all types that are a variant of ObjectID.
type ObjectID ¶
type ObjectID uint64
ObjectID is an object instance identifier. If the specific object type is known, then ObjectID can be cast to ThreadID, ThreadGroupID, StringID, ClassLoaderID, ClassObjectID or ArrayID.
type ObjectType ¶
type ObjectType struct { Kind TypeTag Type ReferenceTypeID }
ObjectType describes a Java type.
type OnEvent ¶
type OnEvent func(Event, SuspendPolicy) bool
OnEvent is the callback passed to WatchEvents. If no more events need to be handled, return false.
type ReferenceTypeID ¶
type ReferenceTypeID uint64
ReferenceTypeID is a reference type identifier. If the specific reference type is known, then ReferenceTypeID can be cast to ClassID, InterfaceID or ArrayTypeID.
func (ReferenceTypeID) String ¶
func (i ReferenceTypeID) String() string
type StepEventModifier ¶
StepEventModifier is an EventModifier that filters step events to those which satisfy depth and size constraints. Can only be used with step events.
type StringID ¶
type StringID uint64
StringID is a string instance identifier. StringID can always be safely cast to the less specific ObjectID.
type SuspendPolicy ¶
type SuspendPolicy byte
SuspendPolicy describes what threads should be suspended on an event being raised.
type TaggedObjectID ¶
TaggedObjectID is a type and object identifier pair.
func (TaggedObjectID) ID ¶
func (i TaggedObjectID) ID() ObjectID
ID returns the ObjectID of the TaggedObjectID
type ThreadGroupID ¶
type ThreadGroupID uint64
ThreadGroupID is an thread group identifier. ThreadGroupID can always be safely cast to the less specific ObjectID.
func (ThreadGroupID) ID ¶
func (i ThreadGroupID) ID() ObjectID
ID returns the ThreadGroupID as an ObjectID
func (ThreadGroupID) String ¶
func (i ThreadGroupID) String() string
type ThreadID ¶
type ThreadID uint64
ThreadID is an thread instance identifier. ThreadID can always be safely cast to the less specific ObjectID.
type ThreadOnlyEventModifier ¶
type ThreadOnlyEventModifier ThreadID
ThreadOnlyEventModifier is an EventModifier that filters the events to those that are raised on the specified thread.
type Value ¶
type Value interface{}
Value is a generic value that can be one of the following types: • bool • Char • int • int8 • int16 • int32 • int64 • float32 • float64 • ArrayID • ClassLoaderID • ClassObjectID • ObjectID • StringID • ThreadGroupID • ThreadID • nil
type VariableRequest ¶
type VariableTable ¶
type VariableTable struct { ArgCount int Slots []FrameVariable }
VariableTable contains all of the variables for a stack frame.
type Version ¶
type Version struct { Description string // Text information on the VM version JDWPMajor int // Major JDWP Version number JDWPMinor int // Minor JDWP Version number Version string // Target VM JRE version, as in the java.version property Name string // Target VM name, as in the java.vm.name property }
Version describes the JDWP version
Source Files
¶
- class_status.go
- cmdset_arrayreference.go
- cmdset_arraytype.go
- cmdset_classtype.go
- cmdset_eventrequest.go
- cmdset_method.go
- cmdset_objectreference.go
- cmdset_referencetypes.go
- cmdset_stackframe.go
- cmdset_stringreference.go
- cmdset_threadreference.go
- cmdset_vm.go
- cmdsets.go
- coder.go
- errors.go
- event.go
- event_kind.go
- field.go
- helpers.go
- invoke_options.go
- jdwp.go
- method.go
- modbits.go
- packet.go
- recv.go
- suspend_policy.go
- tag.go
- type_tag.go
- types.go
- value.go