summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/ptrace_amd64.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2021-03-11 08:23:55 -0800
committergVisor bot <gvisor-bot@google.com>2021-03-11 08:25:51 -0800
commit1020ac83f47cd6b178e7655f413fcd4f3cd2aa4c (patch)
tree891343cb91f9b9b9a76ffa9e974f8d0fdf99023b /pkg/abi/linux/ptrace_amd64.go
parenta44dc15bdce80adf4468972347e3bd7f3ed8d573 (diff)
Move Arch specific code to arch specific files.
PiperOrigin-RevId: 362297474
Diffstat (limited to 'pkg/abi/linux/ptrace_amd64.go')
-rw-r--r--pkg/abi/linux/ptrace_amd64.go11
1 files changed, 11 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
+}