fbsdutil

package
v1.4.1-0...-9011182 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AMD64XstateRead

func AMD64XstateRead(xstateargs []byte, readLegacy bool, regset *AMD64Xstate) error

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 *AMD64Xstate
	Fsbase   uint64
}

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

func (*AMD64Registers) BP

func (r *AMD64Registers) BP() uint64

func (*AMD64Registers) Copy

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

Copy returns a copy of these registers that is guarenteed 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

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.

type AMD64Xstate

type AMD64Xstate linutil.AMD64Xstate

func (*AMD64Xstate) Decode

func (xsave *AMD64Xstate) Decode() (regs []proc.Register)

Jump to

Keyboard shortcuts

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