Documentation
¶
Overview ¶
Package debugger provides a TUI debugger with multi-client support. Runnable command can be found in tools/cmd/am-dbg.
Index ¶
- func AllocMem() uint64
- func RpcGetter(d *Debugger) func(string) any
- type Client
- type Debugger
- func (d *Debugger) AddressFocusedEnd(_ *am.Event)
- func (d *Debugger) AddressFocusedState(e *am.Event)
- func (d *Debugger) AnyState(e *am.Event)
- func (d *Debugger) BackEnter(e *am.Event) bool
- func (d *Debugger) BackState(e *am.Event)
- func (d *Debugger) BackStepEnter(_ *am.Event) bool
- func (d *Debugger) BackStepState(_ *am.Event)
- func (d *Debugger) Client() *Client
- func (d *Debugger) ClientMsgEnter(e *am.Event) bool
- func (d *Debugger) ClientMsgState(e *am.Event)
- func (d *Debugger) ClientSelectedEnd(e *am.Event)
- func (d *Debugger) ClientSelectedState(e *am.Event)
- func (d *Debugger) ConnectEventEnter(e *am.Event) bool
- func (d *Debugger) ConnectEventState(e *am.Event)
- func (d *Debugger) ConnectedClients() int
- func (d *Debugger) CurrentTx() *telemetry.DbgMsgTx
- func (d *Debugger) DisconnectEventEnter(e *am.Event) bool
- func (d *Debugger) DisconnectEventState(e *am.Event)
- func (d *Debugger) Dispose()
- func (d *Debugger) ExceptionState(e *am.Event)
- func (d *Debugger) ExportDialogEnd(e *am.Event)
- func (d *Debugger) ExportDialogState(_ *am.Event)
- func (d *Debugger) FiltersFocusedEnd(_ *am.Event)
- func (d *Debugger) FiltersFocusedEnter(e *am.Event) bool
- func (d *Debugger) FiltersFocusedState(e *am.Event)
- func (d *Debugger) FwdEnter(e *am.Event) bool
- func (d *Debugger) FwdState(e *am.Event)
- func (d *Debugger) FwdStepEnter(_ *am.Event) bool
- func (d *Debugger) FwdStepState(_ *am.Event)
- func (d *Debugger) GcMsgsEnter(e *am.Event) bool
- func (d *Debugger) GcMsgsState(e *am.Event)
- func (d *Debugger) GetMachAddress() *MachAddress
- func (d *Debugger) GetParentTags(c *Client, tags []string) []string
- func (d *Debugger) GoToMachAddress(addr *MachAddress, skipHistory bool) bool
- func (d *Debugger) HealthcheckState(_ *am.Event)
- func (d *Debugger) HelpDialogEnd(e *am.Event)
- func (d *Debugger) HelpDialogState(_ *am.Event)
- func (d *Debugger) ImportData(filename string)
- func (d *Debugger) LogReaderVisibleEnd(e *am.Event)
- func (d *Debugger) LogReaderVisibleState(e *am.Event)
- func (d *Debugger) MatrixRainState(_ *am.Event)
- func (d *Debugger) MatrixViewEnd(_ *am.Event)
- func (d *Debugger) MatrixViewState(_ *am.Event)
- func (d *Debugger) NextTx() *telemetry.DbgMsgTx
- func (d *Debugger) PausedState(_ *am.Event)
- func (d *Debugger) PlayingEnd(_ *am.Event)
- func (d *Debugger) PlayingState(_ *am.Event)
- func (d *Debugger) PrevTx() *telemetry.DbgMsgTx
- func (d *Debugger) ProcessFilterChange(ctx context.Context, filterTxs bool)
- func (d *Debugger) ReadyEnd(_ *am.Event)
- func (d *Debugger) ReadyState(_ *am.Event)
- func (d *Debugger) RedrawFull(immediate bool)
- func (d *Debugger) RemoveClientEnter(e *am.Event) bool
- func (d *Debugger) RemoveClientState(e *am.Event)
- func (d *Debugger) ScrollToMutTxState(e *am.Event)
- func (d *Debugger) ScrollToStepEnter(e *am.Event) bool
- func (d *Debugger) ScrollToStepState(e *am.Event)
- func (d *Debugger) ScrollToTxEnter(e *am.Event) bool
- func (d *Debugger) ScrollToTxState(e *am.Event)
- func (d *Debugger) SelectingClientEnter(e *am.Event) bool
- func (d *Debugger) SelectingClientState(e *am.Event)
- func (d *Debugger) SetCursor1(cursor int, skipHistory bool)
- func (d *Debugger) SetFilterLogLevel(lvl am.LogLevel)
- func (d *Debugger) Start(clientID string, txNum int, uiView string)
- func (d *Debugger) StartEnd(_ *am.Event)
- func (d *Debugger) StartState(e *am.Event)
- func (d *Debugger) StateNameSelectedEnd(_ *am.Event)
- func (d *Debugger) StateNameSelectedState(e *am.Event)
- func (d *Debugger) StateNameSelectedStateNameSelected(e *am.Event)
- func (d *Debugger) SwitchedClientTxState(_ *am.Event)
- func (d *Debugger) SwitchingClientTxState(e *am.Event)
- func (d *Debugger) TailModeEnd(_ *am.Event)
- func (d *Debugger) TailModeState(_ *am.Event)
- func (d *Debugger) TimelineStepsFocusedEnd(_ *am.Event)
- func (d *Debugger) TimelineStepsFocusedState(_ *am.Event)
- func (d *Debugger) TimelineStepsScrolledEnd(_ *am.Event)
- func (d *Debugger) TimelineStepsScrolledState(_ *am.Event)
- func (d *Debugger) ToggleFilterState(e *am.Event)
- func (d *Debugger) TreeMatrixViewEnd(_ *am.Event)
- func (d *Debugger) TreeMatrixViewState(_ *am.Event)
- func (d *Debugger) UserBackState(_ *am.Event)
- func (d *Debugger) UserBackStepState(_ *am.Event)
- func (d *Debugger) UserFwdState(_ *am.Event)
- func (d *Debugger) UserFwdStepState(_ *am.Event)
- type Exportable
- type FilterName
- type Focusable
- type MachAddress
- type MachTime
- type MsgTxParsed
- type Opts
- type OptsFilters
- type RelCol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// bits which get saved into the go file
Exportable
// current transition, 1-based, mirrors the slider
CursorTx1 int
// current step, 1-based, mirrors the slider
CursorStep int
SelectedState string
SelectedReaderEntry *logReaderEntryPtr
ReaderCollapsed bool
// contains filtered or unexported fields
}
type Debugger ¶
type Debugger struct {
*am.ExceptionHandler
Mach *am.Machine
Clients map[string]*Client
Opts Opts
LayoutRoot *cview.Panels
Disposed bool
// selected client
// TODO atomic, drop eval
C *Client
App *cview.Application
// printer for numbers
P *message.Printer
// TODO GC removed machines
History []*MachAddress
HistoryCursor int
// contains filtered or unexported fields
}
func (*Debugger) AddressFocusedEnd ¶ added in v0.9.0
func (*Debugger) AddressFocusedState ¶ added in v0.9.0
func (*Debugger) BackStepState ¶
func (*Debugger) Client ¶ added in v0.7.0
Client returns the current Client. Thread safe via Eval().
func (*Debugger) ClientMsgState ¶
func (*Debugger) ClientSelectedEnd ¶
func (*Debugger) ClientSelectedState ¶
func (*Debugger) ConnectEventState ¶
func (*Debugger) ConnectedClients ¶
func (*Debugger) DisconnectEventState ¶
func (*Debugger) ExceptionState ¶ added in v0.8.0
ExceptionState creates a log file with the error and stack trace, after calling the super exception handler.
func (*Debugger) ExportDialogEnd ¶
func (*Debugger) ExportDialogState ¶
func (*Debugger) FiltersFocusedEnd ¶ added in v0.6.0
func (*Debugger) FiltersFocusedEnter ¶ added in v0.8.0
func (*Debugger) FiltersFocusedState ¶ added in v0.6.0
func (*Debugger) FwdStepState ¶
func (*Debugger) GcMsgsState ¶ added in v0.8.0
func (*Debugger) GetMachAddress ¶ added in v0.9.0
func (d *Debugger) GetMachAddress() *MachAddress
GetMachAddress returns the address of the currently visible view (mach, tx).
func (*Debugger) GetParentTags ¶ added in v0.9.1
func (*Debugger) GoToMachAddress ¶ added in v0.9.0
func (d *Debugger) GoToMachAddress(addr *MachAddress, skipHistory bool) bool
GoToMachAddress tries to render a view of the provided address (mach, tx).
func (*Debugger) HealthcheckState ¶ added in v0.8.0
func (*Debugger) HelpDialogEnd ¶
func (*Debugger) HelpDialogState ¶
func (*Debugger) ImportData ¶
func (*Debugger) LogReaderVisibleEnd ¶ added in v0.8.0
func (*Debugger) LogReaderVisibleState ¶ added in v0.8.0
func (*Debugger) MatrixRainState ¶ added in v0.7.0
func (*Debugger) MatrixViewEnd ¶
func (*Debugger) MatrixViewState ¶
func (*Debugger) PausedState ¶
func (*Debugger) PlayingEnd ¶
func (*Debugger) PlayingState ¶
func (*Debugger) ProcessFilterChange ¶ added in v0.8.0
func (*Debugger) ReadyState ¶ added in v0.8.0
func (*Debugger) RedrawFull ¶
RedrawFull updates all components of the debugger UI, except the sidebar.
func (*Debugger) RemoveClientState ¶
func (*Debugger) ScrollToMutTxState ¶ added in v0.7.0
ScrollToMutTxState scrolls to a transition which mutated the passed state, If fwd is true, it scrolls forward, otherwise backwards.
func (*Debugger) ScrollToStepEnter ¶ added in v0.9.0
func (*Debugger) ScrollToStepState ¶ added in v0.9.0
ScrollToTxState scrolls to a specific transition (cursor position 1-based).
func (*Debugger) ScrollToTxState ¶
ScrollToTxState scrolls to a specific transition (cursor position 1-based).
func (*Debugger) SelectingClientState ¶
func (*Debugger) SetCursor1 ¶ added in v0.9.1
func (*Debugger) SetFilterLogLevel ¶ added in v0.6.4
func (*Debugger) StartState ¶
func (*Debugger) StateNameSelectedEnd ¶
func (*Debugger) StateNameSelectedState ¶
func (*Debugger) StateNameSelectedStateNameSelected ¶
StateNameSelectedStateNameSelected handles cursor moving from a state name to another state name case.
func (*Debugger) SwitchedClientTxState ¶ added in v0.7.0
func (*Debugger) SwitchingClientTxState ¶ added in v0.7.0
func (*Debugger) TailModeEnd ¶ added in v0.8.0
func (*Debugger) TailModeState ¶
func (*Debugger) TimelineStepsFocusedEnd ¶
func (*Debugger) TimelineStepsFocusedState ¶
func (*Debugger) TimelineStepsScrolledEnd ¶ added in v0.9.0
func (*Debugger) TimelineStepsScrolledState ¶ added in v0.9.0
func (*Debugger) ToggleFilterState ¶ added in v0.6.0
TODO enter, valid params
func (*Debugger) TreeMatrixViewEnd ¶
func (*Debugger) TreeMatrixViewState ¶
func (*Debugger) UserBackState ¶
func (*Debugger) UserBackStepState ¶
func (*Debugger) UserFwdState ¶
func (*Debugger) UserFwdStepState ¶
type Exportable ¶
type Exportable struct {
MsgStruct *telemetry.DbgMsgStruct
MsgTxs []*telemetry.DbgMsgTx
}
type FilterName ¶ added in v0.8.0
type FilterName string
TODO refac: ToolbarButton
const (
FilterSummaries FilterName = "hide-summaries"
)
type MachAddress ¶ added in v0.9.0
type MachAddress struct {
MachId string
TxId string
MachTime uint64
HumanTime time.Time
// TODO support step
Step int
}
func (*MachAddress) Clone ¶ added in v0.9.0
func (ma *MachAddress) Clone() *MachAddress
func (*MachAddress) String ¶ added in v0.9.0
func (a *MachAddress) String() string
type MsgTxParsed ¶
type Opts ¶ added in v0.6.4
type Opts struct {
SelectConnected bool
CleanOnConnect bool
EnableMouse bool
ShowReader bool
// MachAddress to listen on
ServerAddr string
// Log level of the debugger's machine
DbgLogLevel am.LogLevel
DbgLogger *log.Logger
// Filters for the transitions and logging
Filters *OptsFilters
// File path to import (brotli)
ImportData string
// Screen overload for tests & ssh
Screen tcell.Screen
// Debugger's ID
ID string
// version of this instance
Version string
MaxMemMb int
Log2Ttl time.Duration
}
