Documentation
¶
Overview ¶
Package debugserver implements the emulator debug server. It speaks a bare line protocol over a localhost TCP port and provides execution control, memory inspection, held memory locations, a cheat-search style memory search, and in-memory machine snapshots. The package has no UI dependencies. A host wires it to the emulator through the Machine interface and calls Service between frames.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Machine ¶
type Machine interface {
// ReadMemory reads guest memory at a canonical native bus address
// into buf and returns the number of bytes read.
ReadMemory(addr uint32, buf []byte) uint32
// WriteMemory writes data to guest memory at a canonical native
// bus address and returns the number of bytes written.
WriteMemory(addr uint32, data []byte) uint32
// Regions is the machine's accessible bus region table.
Regions() []core.BusRegion
Serialize() ([]byte, error)
Deserialize(data []byte) error
}
Machine is the emulator surface the server needs. Memory access is canonical native bus addressed and gated by the machine's region table, the same table the memory access methods serve from.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server owns the listener and all debug state (watches, breaks, pins, searches, snapshots). Connection goroutines read lines and queue clientCmds. The emulation goroutine drains the queue between frames (Service), so command handlers run on the emulation goroutine and everything below the queue is owned by it.
func Start ¶
Start listens on 127.0.0.1:port and serves clients. The paused flag is shared with the host's pause control.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
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.
|
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. |