From 1020ac83f47cd6b178e7655f413fcd4f3cd2aa4c Mon Sep 17 00:00:00 2001 From: Bhasker Hariharan Date: Thu, 11 Mar 2021 08:23:55 -0800 Subject: Move Arch specific code to arch specific files. PiperOrigin-RevId: 362297474 --- pkg/abi/linux/ptrace_arm64.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/abi/linux/ptrace_arm64.go') diff --git a/pkg/abi/linux/ptrace_arm64.go b/pkg/abi/linux/ptrace_arm64.go index 6147738b3..da36811d2 100644 --- a/pkg/abi/linux/ptrace_arm64.go +++ b/pkg/abi/linux/ptrace_arm64.go @@ -27,3 +27,14 @@ type PtraceRegs struct { Pc uint64 Pstate uint64 } + +// InstructionPointer returns the address of the next instruction to be +// executed. +func (p *PtraceRegs) InstructionPointer() uint64 { + return p.Pc +} + +// StackPointer returns the address of the Stack pointer. +func (p *PtraceRegs) StackPointer() uint64 { + return p.Sp +} -- cgit v1.2.3