Documentation ¶
Overview ¶
Package dbgp implements the dbgp client protocol
see https://github.com/derickr/dbgp/blob/master/debugger_protocol.rst
status: pre-alpha
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrParseError means an error occurred while parsing ErrParseError = dbgpError{1, "Parse Error"} // ErrInvalidOpts means invalid options were supplied ErrInvalidOpts = dbgpError{3, "Invaild Options"} // ErrUnimplemented means the attempted action is not implemented ErrUnimplemented = dbgpError{4, "Unimplemented"} )
Functions ¶
This section is empty.
Types ¶
type Breakpoint ¶
type Breakpoint struct { ID int `xml:"breakpoint_id,attr"` // Either "enabled" or "disabled" State string `xml:"state,attr"` }
Breakpoint is a breakpoint in code
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a upstream connection to a DBGP-capable IDE or proxy
func NewConn ¶
func NewConn(conn io.ReadWriter, client DBGPClient) *Conn
NewConn creates a new DBGP client connection with an rw for the communication and a DBGPClient
type DBGPClient ¶
type DBGPClient interface { // Init is called when starting communication with upstream Init() InitResponse // Return status, one of ("starting", "stopping", "running", "break") Status() string // Return supported features (called after Init()) Features() Features // Step the debugger into the program. State being one of ("starting", "stopping", "running", "break"), and reason one of ("ok, "error", "aborted", "exception") StepInto() (status string, reason string) // Step over the program. State being one of ("starting", "stopping", "running", "break"), and reason one of ("ok, "error", "aborted", "exception") StepOver() (status string, reason string) // Return the maximum stack depth StackDepth() int // Return one or more Stack elements based on the requested depth StackGet(depth int) ([]Stack, error) // Return the relevant Contexts ContextNames(depth int) ([]Context, error) // Return the properties associated with the specified stack depth and context ContextGet(depth, context int) ([]Property, error) // Return the value for a property PropertyGet(depth, context int, name string) (string, error) // Set a breakpoint BreakpointSet(bpType, fileName string, line int) (Breakpoint, error) }
The DBGPClient interface captures what a client implementation must provide
type InitResponse ¶
type Property ¶
type Property struct { Name string `xml:"name,attr"` // Short variable name. Fullname string `xml:"fullname,attr"` // Long variable name. This is the long form of the name which can be eval'd by the language to retrieve the value of the variable. Classname string `xml:"classname,attr"` // If the type is an object or resource, then the debugger engine MAY specify the class name This is an optional attribute. Type string `xml:"type,attr"` // language specific data type name Address string `xml:"address,attr"` // containing physical memory address, optional // contains filtered or unexported fields }
type Stack ¶
type Stack struct { Level int `xml:"level,attr"` // the stack depth of this stack element Type string `xml:"type,attr"` // the type of stack frame. Valid values are "file" or "eval" Filename string `xml:"filename,attr"` // absolute file URI in the local filesystem Lineno int `xml:"lineno,attr"` // 1-based line offset into the buffer Where string `xml:"where,attr"` // current command name (optional) // contains filtered or unexported fields }
Directories ¶
Path | Synopsis |
---|---|
Package gdbproxy implements a dbgp.DBGPClient that is backed by a gdb session
|
Package gdbproxy implements a dbgp.DBGPClient that is backed by a gdb session |
cmd/gdb2dbgp
Program dbgp2dbg implements a dbgp to gdb proxy dbg2dbg (gdb target) note: invoke with the following options to debug: -v=2 -logtostderr
|
Program dbgp2dbg implements a dbgp to gdb proxy dbg2dbg (gdb target) note: invoke with the following options to debug: -v=2 -logtostderr |
Click to show internal directories.
Click to hide internal directories.