Documentation
¶
Overview ¶
Package responses holds the shared data types of the debug server's JSON responses: the server serializes them as the data field of its response envelopes and the debugger client decodes them. Types used by only one side (and the envelope and event line shapes, which each side models itself) stay out; this package is the shared vocabulary, nothing more.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BreakInfo ¶
type BreakInfo struct {
Addr uint32 `json:"addr"`
Width int `json:"width"`
Op string `json:"op"`
Val uint32 `json:"val"`
HasVal bool `json:"has_val"`
}
BreakInfo is one break list entry. Val is meaningful only when HasVal is set (comparison operators).
type BreakList ¶
type BreakList struct {
Breaks []BreakInfo `json:"breaks"`
}
BreakList is the break list response.
type CandidateInfo ¶
type CandidateInfo struct {
Addr uint32 `json:"addr"`
Cur uint32 `json:"cur"`
Base uint32 `json:"base"`
}
CandidateInfo is one surviving search candidate. Cur is the live value at list time and Base is the current comparison baseline.
type CandidateList ¶
type CandidateList struct {
Width int `json:"width"`
Total int `json:"total"`
Offset int `json:"offset"`
Candidates []CandidateInfo `json:"candidates"`
}
CandidateList is the list command response. Candidates holds up to the requested count in address order starting at Offset; Total is the full surviving count.
type PinInfo ¶ added in v0.4.0
type PinInfo struct {
Addr uint32 `json:"addr"`
Data string `json:"data"`
Hits uint64 `json:"hits"`
}
PinInfo is one pin list entry. Data is the held bytes hex encoded, the same encoding the pin command takes. Hits counts the frames that ended with the location changed, so it rises by at most one per frame and counts frames rather than writes.
type PinList ¶ added in v0.4.0
type PinList struct {
Pins []PinInfo `json:"pins"`
}
PinList is the pin list response.
type ReadResult ¶
ReadResult is the read command response. Data is the bytes hex encoded.
type RegionInfo ¶
type RegionInfo struct {
Name string `json:"name"`
Start uint32 `json:"start"`
End uint32 `json:"end"`
Size uint32 `json:"size"`
}
RegionInfo is one region list entry. Start and End bound the canonical range inclusive; Size is in bytes. Addresses in the protocol are canonical only; the machine's bus handles all decode internally.
type RegionList ¶
type RegionList struct {
Regions []RegionInfo `json:"regions"`
}
RegionList is the regions command response.
type StateResult ¶
type StateResult struct {
Paused bool `json:"paused"`
Frame uint64 `json:"frame"`
Width int `json:"width"`
SearchActive bool `json:"search_active"`
Candidates int `json:"candidates"`
}
StateResult is the state command response. Width is the search value width setting, which applies whether or not a search is active.