pyspresso.transport

class pyspresso.transport.CommandPacket(id, command, data='', flags=0)

A JDWP Command Packet, as defined at http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html

command = 0

Packet’s command.

command_set = 0

Packet’s command set.

class pyspresso.transport.DebugTransport(transport='dt_shmem', server=False, address=None)

The DebugTransport class defines JDWP transports for both shared-memory-based transport and socket-based transport.

The DebugTransport constructor initializes member variables and binds transport-specific functions.

The transport value should be "dt_shmem" for shared-memory-based transport or "dt_socket" for socket-based transport.

If the server value is True then the debugger acts as the server and the debuggee acts as the client. Otherwise, the debuggee acts as the server and the debugger acts as the client.

The address value should be in the format "hostname:port" for socket-based transport, or should be the shared file mapping name for shared-memory-based transport.

class AtomicCounter

Atomic “fetch and increment” class for packet IDs.

next()

Return the next 32-bit packet ID.

class DebugTransport.Mutex(handle)

Mutex class to support Python’s with statement.

DebugTransport.attach()

Attach to the debuggee.

DebugTransport.handshake()

Perform the initial handshake with the debuggee.

DebugTransport.make_packet(command, data='')

Create a JDWP CommandPacket.

DebugTransport.recv(count)

Receive bytes from the debuggee.

DebugTransport.recv_packet()

Receive the next CommandPacket or ReplyPacket from the debuggee.

DebugTransport.send(bytes)

Send bytes to the debuggee.

DebugTransport.send_packet(packet)

Decode and send a JDWP CommandPacket to the debuggee.

class pyspresso.transport.Packet

Abstract class for a JDWP packet, as defined at http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html

data = ''

Command data or reply data.

flags = 0

Packet flags.

id = 0

Command/reply packet ID.

length = 0

Length of the packet.

class pyspresso.transport.ReplyPacket(id, error_code, data='', flags=128)

A JDWP Reply Packet, as defined at http://docs.oracle.com/javase/8/docs/technotes/guides/jpda/jdwp-spec.html

error_code = 0

Packet’s error response code.