Documentation ¶
Index ¶
- func IsExitEvent(event EventType) bool
- type Client
- func (c *Client) AttachProcess(pid int) (err error)
- func (c *Client) ContinueAndWait() (ev Event, err error)
- func (c *Client) DetachProcess() (err error)
- func (c *Client) LaunchProcess(name string, arg ...string) (err error)
- func (c *Client) ReadMemory(addr uint64, out []byte) (err error)
- func (c *Client) ReadRegisters(threadID int) (regs Registers, err error)
- func (c *Client) ReadTLS(threadID int, offset int32) (addr uint64, err error)
- func (c *Client) StepAndWait(threadID int) (ev Event, err error)
- func (c *Client) WriteMemory(addr uint64, data []byte) (err error)
- func (c *Client) WriteRegisters(threadID int, regs Registers) (err error)
- type Event
- type EventType
- type Registers
- type UnspecifiedThreadError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExitEvent ¶
IsExitEvent returns true if the event indicates the process exits for some reason.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client proxy in order to execute the ptrace requests in the only one go routine. It is because the tracer thread must remain same, which is the limitation of ptrace.
func (*Client) AttachProcess ¶
func (*Client) ContinueAndWait ¶
func (*Client) DetachProcess ¶
func (*Client) LaunchProcess ¶
func (*Client) ReadRegisters ¶
type Event ¶
type Event struct { Type EventType // Data is one of these go types: // // EventType Go type Description // ----------- ------- ----------- // EventTypeTrapped []int A list of trapped thread id // EventTypeCoreDump NA NA // EventTypeExited int Exit status // EventTypeTerminated int Signal number Data interface{} }
Event describes the event happens to the target process.
type EventType ¶
type EventType int
EventType represents the type of the event.
const ( // EventTypeTrapped event happens when the process is trapped. EventTypeTrapped EventType = iota // EventTypeCoreDump event happens when the process terminates unexpectedly. EventTypeCoreDump // EventTypeExited event happens when the process exits. EventTypeExited // EventTypeTerminated event happens when the process is terminated by a signal. EventTypeTerminated )
type UnspecifiedThreadError ¶
type UnspecifiedThreadError struct {
ThreadIDs []int
}
UnspecifiedThreadError indicates the stopped threads include unspecified ones.
func (UnspecifiedThreadError) Error ¶
func (e UnspecifiedThreadError) Error() string
Error returns the list of unspecified threads.
Click to show internal directories.
Click to hide internal directories.