amd64util

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AMD64XstateMaxSize

func AMD64XstateMaxSize() int

func AMD64XstateRead

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

AMD64XstateRead reads a byte array containing an XSAVE area into regset. If readLegacy is true regset.PtraceFpRegs will be filled with the contents of the legacy region of the XSAVE area. See Section 13.1 (and following) of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1: Basic Architecture.

Types

type AMD64PtraceFpRegs

type AMD64PtraceFpRegs struct {
	Cwd      uint16
	Swd      uint16
	Ftw      uint16
	Fop      uint16
	Rip      uint64
	Rdp      uint64
	Mxcsr    uint32
	MxcrMask uint32
	StSpace  [32]uint32
	XmmSpace [256]byte
	Padding  [24]uint32
}

AMD64PtraceFpRegs tracks user_fpregs_struct in /usr/include/x86_64-linux-gnu/sys/user.h

type AMD64Xstate

type AMD64Xstate struct {
	AMD64PtraceFpRegs
	Xsave       []byte // raw xsave area
	AvxState    bool   // contains AVX state
	YmmSpace    [256]byte
	Avx512State bool // contains AVX512 state
	ZmmSpace    [512]byte
}

AMD64Xstate represents amd64 XSAVE area. See Section 13.1 (and following) of Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1: Basic Architecture.

func (*AMD64Xstate) Decode

func (xstate *AMD64Xstate) Decode() []proc.Register

Decode decodes an XSAVE area to a list of name/value pairs of registers.

func (*AMD64Xstate) SetXmmRegister added in v1.6.1

func (xstate *AMD64Xstate) SetXmmRegister(n int, value []byte) error

type DebugRegisters added in v1.6.1

type DebugRegisters struct {
	Dirty bool
	// contains filtered or unexported fields
}

DebugRegisters represents x86 debug registers described in the Intel 64 and IA-32 Architectures Software Developer's Manual, Vol. 3B, section 17.2

func NewDebugRegisters added in v1.6.1

func NewDebugRegisters(pDR0, pDR1, pDR2, pDR3, pDR6, pDR7 *uint64) *DebugRegisters

func (*DebugRegisters) ClearBreakpoint added in v1.6.1

func (drs *DebugRegisters) ClearBreakpoint(idx uint8)

ClearBreakpoint disables the hardware breakpoint at index 'idx'. If the breakpoint was already disabled it does nothing.

func (*DebugRegisters) GetActiveBreakpoint added in v1.6.1

func (drs *DebugRegisters) GetActiveBreakpoint() (ok bool, idx uint8)

GetActiveBreakpoint returns the active hardware breakpoint and resets the condition flags.

func (*DebugRegisters) SetBreakpoint added in v1.6.1

func (drs *DebugRegisters) SetBreakpoint(idx uint8, addr uint64, read, write bool, sz int) error

SetBreakpoint sets hardware breakpoint at index 'idx' to the specified address, read/write flags and size. If the breakpoint is already in use but the parameters match it does nothing.

Jump to

Keyboard shortcuts

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