Documentation
¶
Index ¶
- Constants
- func BuildPacket(data []byte) []byte
- func PacketChecksum(data []byte) uint8
- func ReadPacket(r io.Reader) ([]byte, error)
- func ReadRegister(r io.Reader, definition *core.Register) (core.RegisterValue, error)
- func ReadRegisters(r io.Reader, architecture *Architecture) ([]core.RegisterValue, error)
- func WritePacket(w io.Writer, data []byte) error
- func WriteRegister(w io.Writer, reg *core.RegisterValue) error
- func WriteRegisters(w io.Writer, regs []core.RegisterValue) error
- type Architecture
- type GDBConnection
- type GDBFeature
- type GDBFeatures
- type GDBRSP
- func (gdb *GDBRSP) AddAccessWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
- func (gdb *GDBRSP) AddBreakpoint(ctx context.Context, t core.BreakpointType, address uint, byteLength uint, ...) (*core.Breakpoint, error)
- func (gdb *GDBRSP) AddHardwareBreakpoint(ctx context.Context, address uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
- func (gdb *GDBRSP) AddReadWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
- func (gdb *GDBRSP) AddSoftwareBreakpoint(ctx context.Context, address uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
- func (gdb *GDBRSP) AddWriteWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
- func (gdb *GDBRSP) Close()
- func (gdb *GDBRSP) Continue(ctx context.Context) error
- func (gdb *GDBRSP) ContinueAt(ctx context.Context, address uint) error
- func (gdb *GDBRSP) GetRegister(name string) (*core.Register, error)
- func (gdb *GDBRSP) Interrupt(ctx context.Context) error
- func (gdb *GDBRSP) ProcessReply(ctx context.Context, p []byte) (core.ReplyType, error)
- func (gdb *GDBRSP) QuerySupported(ctx context.Context) (GDBFeatures, error)
- func (gdb *GDBRSP) QueryTarget(ctx context.Context) (*Target, error)
- func (gdb *GDBRSP) QueryTargetPartial(ctx context.Context) (*Target, error)
- func (gdb *GDBRSP) ReadFeature(ctx context.Context, path string) ([]byte, error)
- func (gdb *GDBRSP) ReadMemory(ctx context.Context, address uint, length uint) ([]byte, error)
- func (gdb *GDBRSP) ReadRegister(ctx context.Context, reg *core.Register) (core.RegisterValue, error)
- func (gdb *GDBRSP) ReadRegisterIndex(ctx context.Context, index uint) (core.RegisterValue, error)
- func (gdb *GDBRSP) ReadRegisters(ctx context.Context) ([]core.RegisterValue, error)
- func (gdb *GDBRSP) ReadRegistersRaw(ctx context.Context) ([]byte, error)
- func (gdb *GDBRSP) RecvResponse(ctx context.Context) ([]byte, error)
- func (gdb *GDBRSP) RemoveBreakpoint(ctx context.Context, b *core.Breakpoint) error
- func (gdb *GDBRSP) Run(ctx context.Context) error
- func (gdb *GDBRSP) SendCommand(ctx context.Context, data string) error
- func (gdb *GDBRSP) SendRawCommand(ctx context.Context, data []byte) error
- func (gdb *GDBRSP) Step(ctx context.Context) error
- func (gdb *GDBRSP) StepAt(ctx context.Context, address uint) error
- func (gdb *GDBRSP) Update(ctx context.Context) error
- func (gdb *GDBRSP) WaitForReply(ctx context.Context) (core.ReplyType, error)
- func (gdb *GDBRSP) WriteMemory(ctx context.Context, address uint, data []byte) error
- func (gdb *GDBRSP) WriteRegister(ctx context.Context, regVal core.RegisterValue) error
- func (gdb *GDBRSP) WriteRegisterIndex(ctx context.Context, index uint, data []byte) error
- func (gdb *GDBRSP) WriteRegisters(ctx context.Context, regs []core.RegisterValue) error
- type Target
Constants ¶
View Source
const ( SoftwareBreakpoint core.BreakpointType = iota HardwareBreakpoint WriteWatchpoint ReadWatchpoint AccessWatchpoint )
Variables ¶
This section is empty.
Functions ¶
func BuildPacket ¶
func PacketChecksum ¶
func ReadRegister ¶
func ReadRegisters ¶
func ReadRegisters(r io.Reader, architecture *Architecture) ([]core.RegisterValue, error)
func WriteRegister ¶
func WriteRegister(w io.Writer, reg *core.RegisterValue) error
func WriteRegisters ¶
func WriteRegisters(w io.Writer, regs []core.RegisterValue) error
Types ¶
type Architecture ¶
func NewArchitecture ¶
func NewArchitecture() *Architecture
func ReadArchitecture ¶
func ReadArchitecture(r io.Reader) (*Architecture, error)
func (*Architecture) FormatAddress ¶
func (arch *Architecture) FormatAddress(addr uint) string
func (*Architecture) PointerBitSize ¶
func (arch *Architecture) PointerBitSize() uint
type GDBConnection ¶
type GDBConnection interface {
io.ReadWriteCloser
SetDeadline(t time.Time) error
}
type GDBFeature ¶
func ParseFeature ¶
func ParseFeature(data string) (string, GDBFeature, error)
type GDBFeatures ¶
type GDBFeatures = map[string]GDBFeature
func ParseFeatures ¶
func ParseFeatures(data string) (GDBFeatures, error)
type GDBRSP ¶
type GDBRSP struct {
Conn GDBConnection
Target *Target
ThreadID uint32
Breakpoints core.Breakpoints
Stopped bool
ExitCode uint
SignalCode uint
}
func NewGDBRSP ¶
func NewGDBRSP(conn GDBConnection) *GDBRSP
func (*GDBRSP) AddAccessWatchpoint ¶
func (gdb *GDBRSP) AddAccessWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) AddBreakpoint ¶
func (gdb *GDBRSP) AddBreakpoint(ctx context.Context, t core.BreakpointType, address uint, byteLength uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) AddHardwareBreakpoint ¶
func (gdb *GDBRSP) AddHardwareBreakpoint(ctx context.Context, address uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) AddReadWatchpoint ¶
func (gdb *GDBRSP) AddReadWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) AddSoftwareBreakpoint ¶
func (gdb *GDBRSP) AddSoftwareBreakpoint(ctx context.Context, address uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) AddWriteWatchpoint ¶
func (gdb *GDBRSP) AddWriteWatchpoint(ctx context.Context, address uint, length uint, handler core.BreakpointHandler) (*core.Breakpoint, error)
func (*GDBRSP) ProcessReply ¶
func (*GDBRSP) QuerySupported ¶
func (gdb *GDBRSP) QuerySupported(ctx context.Context) (GDBFeatures, error)
func (*GDBRSP) QueryTargetPartial ¶
func (*GDBRSP) ReadFeature ¶
func (*GDBRSP) ReadMemory ¶
func (*GDBRSP) ReadRegister ¶
func (*GDBRSP) ReadRegisterIndex ¶
func (*GDBRSP) ReadRegisters ¶
func (*GDBRSP) ReadRegistersRaw ¶
func (*GDBRSP) RemoveBreakpoint ¶
func (*GDBRSP) SendRawCommand ¶
func (*GDBRSP) WaitForReply ¶
func (*GDBRSP) WriteMemory ¶
func (*GDBRSP) WriteRegister ¶
func (*GDBRSP) WriteRegisterIndex ¶
func (*GDBRSP) WriteRegisters ¶
Click to show internal directories.
Click to hide internal directories.