trace command

This commit is contained in:
aarzilli
2015-06-28 17:00:56 +02:00
parent c267eda9ba
commit 3a96d8eed7
12 changed files with 334 additions and 94 deletions

View File

@ -7,8 +7,13 @@ type DebuggerState struct {
Breakpoint *Breakpoint `json:"breakPoint,omitempty"`
// CurrentThread is the currently selected debugger thread.
CurrentThread *Thread `json:"currentThread,omitempty"`
// Information requested by the current breakpoint
BreakpointInfo *BreakpointInfo `json:"breakPointInfo,omitrempty"`
// Exited indicates whether the debugged process has exited.
Exited bool `json:"exited"`
// Filled by RPCClient.Continue, indicates an error
Err error `json:"-"`
}
// Breakpoint addresses a location at which process execution may be
@ -25,6 +30,15 @@ type Breakpoint struct {
// FunctionName is the name of the function at the current breakpoint, and
// may not always be available.
FunctionName string `json:"functionName,omitempty"`
// tracepoint flag
Tracepoint bool `json:"continue"`
// number of stack frames to retrieve
Stacktrace int `json:"stacktrace"`
// retrieve goroutine information
Goroutine bool `json:"goroutine"`
// variables to evaluate
Symbols []string `json:"symbols,omitempty"`
}
// Thread is a thread within the debugged process.
@ -92,6 +106,13 @@ type DebuggerCommand struct {
ThreadID int `json:"threadID,omitempty"`
}
// Informations about the current breakpoint
type BreakpointInfo struct {
Stacktrace []Location `json:"stacktrace,omitempty"`
Goroutine *Goroutine `json:"goroutine,omitempty"`
Variables []Variable `json:"variables,omitempty"`
}
const (
// Continue resumes process execution.
Continue = "continue"