2020-01-14 10:38:55 +00:00
|
|
|
// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
|
2018-01-09 18:57:14 +00:00
|
|
|
|
2021-06-04 08:59:18 +00:00
|
|
|
//go:build linux && (arm || arm64)
|
2018-01-09 18:57:14 +00:00
|
|
|
// +build linux
|
|
|
|
// +build arm arm64
|
|
|
|
|
|
|
|
package unix
|
|
|
|
|
|
|
|
import "unsafe"
|
|
|
|
|
|
|
|
// PtraceRegsArm is the registers used by arm binaries.
|
|
|
|
type PtraceRegsArm struct {
|
|
|
|
Uregs [18]uint32
|
|
|
|
}
|
|
|
|
|
|
|
|
// PtraceGetRegsArm fetches the registers used by arm binaries.
|
|
|
|
func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
|
2023-03-06 20:14:36 +00:00
|
|
|
return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
|
2018-01-09 18:57:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PtraceSetRegsArm sets the registers used by arm binaries.
|
|
|
|
func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
|
2023-03-06 20:14:36 +00:00
|
|
|
return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
|
2018-01-09 18:57:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PtraceRegsArm64 is the registers used by arm64 binaries.
|
|
|
|
type PtraceRegsArm64 struct {
|
|
|
|
Regs [31]uint64
|
|
|
|
Sp uint64
|
|
|
|
Pc uint64
|
|
|
|
Pstate uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
// PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
|
|
|
|
func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
|
2023-03-06 20:14:36 +00:00
|
|
|
return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout))
|
2018-01-09 18:57:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PtraceSetRegsArm64 sets the registers used by arm64 binaries.
|
|
|
|
func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
|
2023-03-06 20:14:36 +00:00
|
|
|
return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs))
|
2018-01-09 18:57:14 +00:00
|
|
|
}
|