diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-11 17:10:12 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-11 17:10:12 +0000 |
commit | 3bbc07ece91af55682430e6ae2a30060f5f7fd9c (patch) | |
tree | 4fa3f0fa4ee5e5ca8c0abbfce8a468099db86d8e | |
parent | 225d7604f7920ec2f1c0d0a8b94ee296f44fa0aa (diff) | |
parent | 1020ac83f47cd6b178e7655f413fcd4f3cd2aa4c (diff) |
Merge release-20210301.0-35-g1020ac83f (automated)
-rw-r--r-- | pkg/abi/linux/ptrace_amd64.go | 11 | ||||
-rw-r--r-- | pkg/abi/linux/ptrace_arm64.go | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkg/abi/linux/ptrace_amd64.go b/pkg/abi/linux/ptrace_amd64.go index ed3881e27..50e22fe7e 100644 --- a/pkg/abi/linux/ptrace_amd64.go +++ b/pkg/abi/linux/ptrace_amd64.go @@ -50,3 +50,14 @@ type PtraceRegs struct { Fs uint64 Gs uint64 } + +// InstructionPointer returns the address of the next instruction to +// be executed. +func (p *PtraceRegs) InstructionPointer() uint64 { + return p.Rip +} + +// StackPointer returns the address of the Stack pointer. +func (p *PtraceRegs) StackPointer() uint64 { + return p.Rsp +} 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 +} |