Documentation ¶
Overview ¶
Package developer offers additional functionality to the developer of ROMs that use a coprocessor. It uses available DWARF data for a binary in order to provide the developer performance profiling and variable information.
The functionality of this package will be greatly expanded in the future.
Index ¶
- type Cartridge
- type Developer
- func (dev *Developer) AttachCartridge(cart Cartridge, romFile string, elfFile string) error
- func (dev *Developer) BorrowBreakpoints(f func(breakpoints.Breakpoints))
- func (dev *Developer) BorrowCallStack(f func(callstack.CallStack))
- func (dev *Developer) BorrowFaults(f func(*faults.Faults))
- func (dev *Developer) BorrowSource(f func(*dwarf.Source))
- func (dev *Developer) BorrowYieldState(f func(yield.State))
- func (dev *Developer) BreakNextInstruction()
- func (dev *Developer) CheckBreakpoint(addr uint32) bool
- func (dev *Developer) EnableStrobe(enable bool, addr uint32)
- func (dev *Developer) HasSource() bool
- func (dev *Developer) HighAddress() uint32
- func (dev *Developer) MemoryFault(event string, fault faults.Category, instructionAddr uint32, accessAddr uint32)
- func (dev *Developer) NewFrame(frameInfo television.FrameInfo) error
- func (dev *Developer) OnYield(addr uint32, yield coprocessor.CoProcYield)
- func (dev *Developer) ProcessProfiling()
- func (dev *Developer) Profiling() *coprocessor.CartCoProcProfiler
- func (dev *Developer) SearchStaticMemory(output io.Writer, data uint32, width int) error
- func (dev *Developer) SetEmulationState(state govern.State)
- func (dev *Developer) StartProfiling()
- type Emulation
- type InstructionRange
- type TV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cartridge ¶ added in v0.25.0
type Cartridge interface { GetCoProcBus() coprocessor.CartCoProcBus GetStaticBus() mapper.CartStaticBus }
Cartridge defines the interface to the cartridge required by the developer package
type Developer ¶
type Developer struct {
// contains filtered or unexported fields
}
Developer implements the CartCoProcDeveloper interface.
func NewDeveloper ¶
NewDeveloper is the preferred method of initialisation for the Developer type.
func (*Developer) AttachCartridge ¶ added in v0.20.0
func (*Developer) BorrowBreakpoints ¶ added in v0.25.0
func (dev *Developer) BorrowBreakpoints(f func(breakpoints.Breakpoints))
BorrowBreakpoints will lock the breakpoints structure for the durction of the supplied function, which will be executed with the breakpoints structure as an argument.
func (*Developer) BorrowCallStack ¶ added in v0.25.0
BorrowCallStack will lock the callstack structure for the durction of the supplied function, which will be executed with the callstack structure as an argument.
In some situations BorrowCallStack may need to be wrapped in a BorrowSource call in order to prevent a race condition
func (*Developer) BorrowFaults ¶ added in v0.25.0
BorrowFaults will lock the illegal access log for the duration of the supplied fucntion, which will be executed with the illegal access log as an argument.
func (*Developer) BorrowSource ¶
BorrowSource will lock the source code structure for the durction of the supplied function, which will be executed with the source code structure as an argument.
May return nil.
func (*Developer) BorrowYieldState ¶ added in v0.20.0
BorrowYieldState will lock the illegal access log for the duration of the supplied fucntion, which will be executed with the illegal access log as an argument.
In some situations BorrowYieldState may need to be wrapped in a BorrowSource call in order to prevent a race condition
func (*Developer) BreakNextInstruction ¶ added in v0.25.0
func (dev *Developer) BreakNextInstruction()
BreakOnNextStep forces the coprocess to break after next instruction execution
func (*Developer) CheckBreakpoint ¶ added in v0.19.3
CheckBreakpoint implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) EnableStrobe ¶ added in v0.30.0
EnableStrobe sets the yield strobe to the specified enable state and the specified address
func (*Developer) HighAddress ¶ added in v0.20.0
HighAddress implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) MemoryFault ¶ added in v0.25.0
func (dev *Developer) MemoryFault(event string, fault faults.Category, instructionAddr uint32, accessAddr uint32)
MemoryFault implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) NewFrame ¶
func (dev *Developer) NewFrame(frameInfo television.FrameInfo) error
NewFrame implements the television.FrameTrigger interface.
func (*Developer) OnYield ¶ added in v0.20.0
func (dev *Developer) OnYield(addr uint32, yield coprocessor.CoProcYield)
OnYield implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) ProcessProfiling ¶ added in v0.19.3
func (dev *Developer) ProcessProfiling()
ProcessProfiling implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) Profiling ¶ added in v0.19.3
func (dev *Developer) Profiling() *coprocessor.CartCoProcProfiler
Profiling implements the coprocessor.CartCoProcDeveloper interface.
func (*Developer) SearchStaticMemory ¶ added in v0.33.0
SearchStaticMemory searches the cartridges static memory areas for
func (*Developer) SetEmulationState ¶ added in v0.25.0
SetEmulationState is called by the emulation whenever state changes
func (*Developer) StartProfiling ¶ added in v0.19.3
func (dev *Developer) StartProfiling()
StartProfiling implements the coprocessor.CartCoProcDeveloper interface.
type Emulation ¶ added in v0.25.0
Emulation defines an interface to the emulation for retreiving the emulation state
type InstructionRange ¶ added in v0.22.0
type InstructionRange struct {
Instructions []*dwarf.SourceInstruction
}
InstructionRange is used to dynamically create a list of SourceInstruction entries.
func (*InstructionRange) Add ¶ added in v0.22.0
func (rng *InstructionRange) Add(line *dwarf.SourceLine)
Add the instructions for a SourceLine to the range.
func (*InstructionRange) Clear ¶ added in v0.22.0
func (rng *InstructionRange) Clear()
Clear all instructions from the range.
func (*InstructionRange) IsEmpty ¶ added in v0.22.0
func (rng *InstructionRange) IsEmpty() bool
IsEmpty returns true if there are no instructions entries in the range.
func (*InstructionRange) Len ¶ added in v0.22.0
func (rng *InstructionRange) Len() int
Len implements the sort.Sort interface.
func (*InstructionRange) Less ¶ added in v0.22.0
func (rng *InstructionRange) Less(i int, j int) bool
Less implements the sort.Sort interface.
func (*InstructionRange) Swap ¶ added in v0.22.0
func (rng *InstructionRange) Swap(i int, j int)
Swap implements the sort.Sort interface.
type TV ¶ added in v0.18.0
type TV interface { GetFrameInfo() television.FrameInfo GetCoords() coords.TelevisionCoords GetLastSignal() signal.SignalAttributes }
TV is the interface from the developer type to the television implementation.
Directories ¶
Path | Synopsis |
---|---|
Package breakpoints records the breakpoints assigned to memory addresses.
|
Package breakpoints records the breakpoints assigned to memory addresses. |
Package callstack maintains the callstack of an executing program as accurately as possible.
|
Package callstack maintains the callstack of an executing program as accurately as possible. |
leb128
Package leb128 implements the Variable Length Data encoding method as required by the DWARF debugging format.
|
Package leb128 implements the Variable Length Data encoding method as required by the DWARF debugging format. |
Package faults records memory faults generated by a coprocessor.
|
Package faults records memory faults generated by a coprocessor. |
Package mapfile reads a mapfile produced by GCC and parses it.
|
Package mapfile reads a mapfile produced by GCC and parses it. |
Package profiling defines the types that are used to profile the performance of the coporocessor program.
|
Package profiling defines the types that are used to profile the performance of the coporocessor program. |
Package yield records the current yielded state of a coprocessor.
|
Package yield records the current yielded state of a coprocessor. |