developer

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

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

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

func NewDeveloper(state Emulation, tv TV) Developer

NewDeveloper is the preferred method of initialisation for the Developer type.

func (*Developer) AttachCartridge added in v0.20.0

func (dev *Developer) AttachCartridge(cart Cartridge, romFile string, elfFile string) error

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

func (dev *Developer) BorrowCallStack(f func(callstack.CallStack))

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

func (dev *Developer) BorrowFaults(f func(*faults.Faults))

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

func (dev *Developer) BorrowSource(f func(*dwarf.Source))

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

func (dev *Developer) BorrowYieldState(f func(yield.State))

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

func (dev *Developer) CheckBreakpoint(addr uint32) bool

CheckBreakpoint implements the coprocessor.CartCoProcDeveloper interface.

func (*Developer) EnableStrobe added in v0.30.0

func (dev *Developer) EnableStrobe(enable bool, addr uint32)

EnableStrobe sets the yield strobe to the specified enable state and the specified address

func (*Developer) HasSource

func (dev *Developer) HasSource() bool

HasSource returns true if source information has been found.

func (*Developer) HighAddress added in v0.20.0

func (dev *Developer) HighAddress() uint32

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

func (dev *Developer) SearchStaticMemory(output io.Writer, data uint32, width int) error

SearchStaticMemory searches the cartridges static memory areas for

func (*Developer) SetEmulationState added in v0.25.0

func (dev *Developer) SetEmulationState(state govern.State)

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

type Emulation interface {
	State() govern.State
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL