fbsdutil

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMD64PtraceRegs

type AMD64PtraceRegs struct {
	R15    int64
	R14    int64
	R13    int64
	R12    int64
	R11    int64
	R10    int64
	R9     int64
	R8     int64
	Rdi    int64
	Rsi    int64
	Rbp    int64
	Rbx    int64
	Rdx    int64
	Rcx    int64
	Rax    int64
	Trapno uint32
	Fs     uint16
	Gs     uint16
	Err    uint32
	Es     uint16
	Ds     uint16
	Rip    int64
	Cs     int64
	Rflags int64
	Rsp    int64
	Ss     int64
}

AMD64PtraceRegs is the struct used by the freebsd kernel to return the general purpose registers for AMD64 CPUs. source: sys/x86/include/reg.h

type AMD64Registers

type AMD64Registers struct {
	Regs     *AMD64PtraceRegs
	Fpregs   []proc.Register
	Fpregset *amd64util.AMD64Xstate
	Fsbase   uint64
	// contains filtered or unexported fields
}

AMD64Registers implements the proc.Registers interface for the native/freebsd backend and core/freebsd backends, on AMD64.

func NewAMD64Registers added in v1.4.1

func NewAMD64Registers(regs *AMD64PtraceRegs, fsbase uint64, loadFpRegs func(*AMD64Registers) error) *AMD64Registers

func (*AMD64Registers) BP

func (r *AMD64Registers) BP() uint64

func (*AMD64Registers) Copy

func (r *AMD64Registers) Copy() (proc.Registers, error)

Copy returns a copy of these registers that is guaranteed not to change.

func (*AMD64Registers) GAddr

func (r *AMD64Registers) GAddr() (uint64, bool)

GAddr returns the address of the G variable if it is known, 0 and false otherwise.

func (*AMD64Registers) Get

func (r *AMD64Registers) Get(n int) (uint64, error)

Get returns the value of the n-th register (in x86asm order).

func (*AMD64Registers) PC

func (r *AMD64Registers) PC() uint64

PC returns the value of RIP register.

func (*AMD64Registers) SP

func (r *AMD64Registers) SP() uint64

SP returns the value of RSP register.

func (*AMD64Registers) Slice

func (r *AMD64Registers) Slice(floatingPoint bool) ([]proc.Register, error)

Slice returns the registers as a list of (name, value) pairs.

func (*AMD64Registers) TLS

func (r *AMD64Registers) TLS() uint64

TLS returns the address of the thread local storage memory segment.

Jump to

Keyboard shortcuts

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