Documentation
¶
Overview ¶
Package debugabi defines the debugger-independent LLGo runtime contract.
Index ¶
Constants ¶
const ( SchemaVersion uint8 = 1 RuntimeLayoutVersion uint8 = 2 LLGoABIVersion uint8 = 1 RecordVersion uint8 = 1 RecordSize = 16 NativeRecordSymbol = "__llgo_debugger_abi_v1" LegacyMarkerSymbol = "__llgo_debugger_marker_v1" WasmSectionName = "llgo.debugger" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteOrder ¶
type ByteOrder uint8
ByteOrder is the target byte order recorded independently of the fixed byte-oriented debugger record encoding.
type LegacyContract ¶
type LegacyContract struct {
SchemaVersion uint8 `json:"schema_version"`
RuntimeLayoutVersion uint8 `json:"runtime_layout_version"`
LLGoABIVersion uint8 `json:"llgo_abi_version"`
}
LegacyContract maps the original symbol-only marker to explicit versions.
type Record ¶
type Record struct {
RecordVersion uint8
SchemaVersion uint8
RuntimeLayoutVersion uint8
LLGoABIVersion uint8
PointerSize uint8
ByteOrder ByteOrder
}
Record identifies the schema and the target ABI needed by debugger frontends. Every field is one byte so the record has the same encoding on native targets and in a WebAssembly custom section.
func ParseRecord ¶
ParseRecord validates and decodes a v1 debugger ABI record.
func (Record) MarshalBinary ¶
MarshalBinary serializes the record using the stable v1 byte layout.
type Schema ¶
type Schema struct {
Contract string `json:"contract"`
SchemaVersion uint8 `json:"schema_version"`
RuntimeLayoutVersion uint8 `json:"runtime_layout_version"`
LLGoABIVersion uint8 `json:"llgo_abi_version"`
Record SchemaRecord `json:"record"`
ByteOrders map[string]string `json:"byte_orders"`
RuntimeLayouts map[string]json.RawMessage `json:"runtime_layouts"`
}
Schema is the stable, language-neutral description consumed by LLDB, GDB, and browser adapters.
func ParseSchemaV1 ¶
ParseSchemaV1 validates the canonical schema metadata and returns it.
type SchemaField ¶
type SchemaField struct {
Name string `json:"name"`
Offset int `json:"offset"`
Size int `json:"size"`
}
SchemaField describes one byte range in Record.
type SchemaRecord ¶
type SchemaRecord struct {
Version uint8 `json:"version"`
Size int `json:"size"`
MagicHex string `json:"magic_hex"`
NativeSymbol string `json:"native_symbol"`
LegacySymbols map[string]LegacyContract `json:"legacy_symbols"`
WasmCustomSection string `json:"wasm_custom_section"`
Fields []SchemaField `json:"fields"`
}
SchemaRecord describes how frontends locate and decode Record.