Documentation ¶
Index ¶
- type Breakpoint
- type DebugCommand
- type DebugCommandSimple
- type DebugCommandStep
- type DebugWindow
- func (debug *DebugWindow) AddInstruction(pc uint16, instruction nes.Instruction)
- func (debug *DebugWindow) Close()
- func (debug *DebugWindow) HandleKey(event sdl.Event)
- func (debug *DebugWindow) HandleText(event sdl.Event)
- func (debug *DebugWindow) IsWindow(windowId uint32) bool
- func (debug *DebugWindow) Open(mainQuit context.Context)
- func (debug *DebugWindow) Redraw()
- func (debug *DebugWindow) SetCycle(cycle uint64)
- func (debug *DebugWindow) SetDebugger(debugger Debugger)
- func (debug *DebugWindow) SetRegisters(registers Registers)
- type Debugger
- type DebuggerMode
- type DebuggerTabComplete
- type DebuggerTextAdd
- type DebuggerTextBackspace
- type DebuggerTextClearLine
- type DebuggerTextEnter
- type DebuggerTextRemoveWord
- type DefaultDebugger
- func (debugger *DefaultDebugger) AddCurrentPCBreakpoint() Breakpoint
- func (debugger *DefaultDebugger) AddPCBreakpoint(pc uint16) Breakpoint
- func (debugger *DefaultDebugger) Close()
- func (debugger *DefaultDebugger) Continue()
- func (debugger *DefaultDebugger) ContinueUntilBreak()
- func (debugger *DefaultDebugger) GetBreakpoints() []Breakpoint
- func (debugger *DefaultDebugger) Handle(cpu *nes.CPUState) bool
- func (debugger *DefaultDebugger) IsStopped() bool
- func (debugger *DefaultDebugger) Next()
- func (debugger *DefaultDebugger) RemoveBreakpoint(id uint64) bool
- func (debugger *DefaultDebugger) Step(count int)
- func (debugger *DefaultDebugger) Stop()
- func (debugger *DefaultDebugger) Update(cpu *nes.CPUState, table nes.InstructionTable)
- func (debugger *DefaultDebugger) WithLock(fn func())
- type Instruction
- type Line
- type Registers
- type WindowRequest
- type WindowRequestBackspace
- type WindowRequestRaise
- type WindowRequestRedraw
- type WindowRequestWindow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Breakpoint ¶
break when the cpu's PC is at a specific value TODO: add conditional breakpoints, and break upon reading/writing specific memory addresses
type DebugCommand ¶
type DebugCommand interface {
Name() string
}
var DebugCommandContinue DebugCommand = makeCommand("continue")
var DebugCommandNext DebugCommand = makeCommand("next")
type DebugCommandSimple ¶
type DebugCommandSimple struct {
// contains filtered or unexported fields
}
func (*DebugCommandSimple) Name ¶
func (command *DebugCommandSimple) Name() string
type DebugCommandStep ¶
type DebugCommandStep struct {
// contains filtered or unexported fields
}
func (*DebugCommandStep) Name ¶
func (command *DebugCommandStep) Name() string
type DebugWindow ¶
type DebugWindow struct { Quit context.Context Cancel context.CancelFunc Requests chan WindowRequest IsOpen bool Wait sync.WaitGroup BigFont *ttf.Font SmallFont *ttf.Font Line Line Instructions []Instruction Lock sync.Mutex Debugger Debugger Cycle uint64 Registers Registers LastCommand string // contains filtered or unexported fields }
func MakeDebugWindow ¶
func (*DebugWindow) AddInstruction ¶
func (debug *DebugWindow) AddInstruction(pc uint16, instruction nes.Instruction)
func (*DebugWindow) Close ¶
func (debug *DebugWindow) Close()
func (*DebugWindow) HandleKey ¶
func (debug *DebugWindow) HandleKey(event sdl.Event)
func (*DebugWindow) HandleText ¶
func (debug *DebugWindow) HandleText(event sdl.Event)
func (*DebugWindow) IsWindow ¶
func (debug *DebugWindow) IsWindow(windowId uint32) bool
func (*DebugWindow) Open ¶
func (debug *DebugWindow) Open(mainQuit context.Context)
func (*DebugWindow) Redraw ¶
func (debug *DebugWindow) Redraw()
func (*DebugWindow) SetCycle ¶
func (debug *DebugWindow) SetCycle(cycle uint64)
func (*DebugWindow) SetDebugger ¶
func (debug *DebugWindow) SetDebugger(debugger Debugger)
func (*DebugWindow) SetRegisters ¶
func (debug *DebugWindow) SetRegisters(registers Registers)
type Debugger ¶
type Debugger interface { Handle(*nes.CPUState) bool AddPCBreakpoint(uint16) Breakpoint AddCurrentPCBreakpoint() Breakpoint RemoveBreakpoint(id uint64) bool GetBreakpoints() []Breakpoint Continue() Step(count int) Next() IsStopped() bool Update(*nes.CPUState, nes.InstructionTable) Close() }
func MakeDebugger ¶
func MakeDebugger(cpu *nes.CPUState, window *DebugWindow) Debugger
type DebuggerMode ¶
type DebuggerMode int
const ( ModeStopped DebuggerMode = iota ModeStepping ModeNext ModeContinue )
type DebuggerTabComplete ¶
type DebuggerTabComplete struct { }
type DebuggerTextAdd ¶
type DebuggerTextAdd struct {
Text string
}
type DebuggerTextBackspace ¶
type DebuggerTextBackspace struct { }
type DebuggerTextClearLine ¶
type DebuggerTextClearLine struct { }
type DebuggerTextEnter ¶
type DebuggerTextEnter struct { }
type DebuggerTextRemoveWord ¶
type DebuggerTextRemoveWord struct { }
type DefaultDebugger ¶
type DefaultDebugger struct { Commands chan DebugCommand Mode DebuggerMode Breakpoints []Breakpoint BreakpointId uint64 Cpu *nes.CPUState Window *DebugWindow Lock sync.Mutex LastPc uint16 StepCount int }
func (*DefaultDebugger) AddCurrentPCBreakpoint ¶
func (debugger *DefaultDebugger) AddCurrentPCBreakpoint() Breakpoint
func (*DefaultDebugger) AddPCBreakpoint ¶
func (debugger *DefaultDebugger) AddPCBreakpoint(pc uint16) Breakpoint
func (*DefaultDebugger) Close ¶
func (debugger *DefaultDebugger) Close()
func (*DefaultDebugger) Continue ¶
func (debugger *DefaultDebugger) Continue()
func (*DefaultDebugger) ContinueUntilBreak ¶
func (debugger *DefaultDebugger) ContinueUntilBreak()
func (*DefaultDebugger) GetBreakpoints ¶
func (debugger *DefaultDebugger) GetBreakpoints() []Breakpoint
func (*DefaultDebugger) IsStopped ¶
func (debugger *DefaultDebugger) IsStopped() bool
func (*DefaultDebugger) Next ¶
func (debugger *DefaultDebugger) Next()
func (*DefaultDebugger) RemoveBreakpoint ¶
func (debugger *DefaultDebugger) RemoveBreakpoint(id uint64) bool
func (*DefaultDebugger) Step ¶
func (debugger *DefaultDebugger) Step(count int)
func (*DefaultDebugger) Stop ¶
func (debugger *DefaultDebugger) Stop()
func (*DefaultDebugger) Update ¶
func (debugger *DefaultDebugger) Update(cpu *nes.CPUState, table nes.InstructionTable)
func (*DefaultDebugger) WithLock ¶
func (debugger *DefaultDebugger) WithLock(fn func())
type Instruction ¶
type Instruction struct { PC uint16 Instruction nes.Instruction }
type WindowRequest ¶
type WindowRequest any
type WindowRequestBackspace ¶
type WindowRequestBackspace struct { }
type WindowRequestRaise ¶
type WindowRequestRaise struct { }
type WindowRequestRedraw ¶
type WindowRequestRedraw struct { }
type WindowRequestWindow ¶
Click to show internal directories.
Click to hide internal directories.