Move Arch specific code to arch specific files.

PiperOrigin-RevId: 362297474
This commit is contained in:
Bhasker Hariharan
2021-03-11 08:25:51 -08:00
committed by gVisor bot
parent a44dc15bdc
commit 1020ac83f4
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -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
}
+11
View File
@@ -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
}