summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/testutil/testutil_amd64.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-10-09 12:00:53 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-09 12:00:53 -0700
commit7a2d5b2fa7c398f7710a134b5790265bf620fced (patch)
tree958b1e1ffe3ac434285ab5097ee690de014e13a9 /pkg/sentry/platform/kvm/testutil/testutil_amd64.go
parentf1061aabaf57e2d3344129dcbcc4841cba0c2616 (diff)
parent8e73e2cec5f9f766387d980314d1f7a851fc7eef (diff)
Merge pull request #811 from lubinszARM:pr_testutil
PiperOrigin-RevId: 273781641
Diffstat (limited to 'pkg/sentry/platform/kvm/testutil/testutil_amd64.go')
-rw-r--r--pkg/sentry/platform/kvm/testutil/testutil_amd64.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/testutil/testutil_amd64.go b/pkg/sentry/platform/kvm/testutil/testutil_amd64.go
index 203d71528..4c108abbf 100644
--- a/pkg/sentry/platform/kvm/testutil/testutil_amd64.go
+++ b/pkg/sentry/platform/kvm/testutil/testutil_amd64.go
@@ -21,6 +21,9 @@ import (
"syscall"
)
+// TwiddleSegments reads segments into known registers.
+func TwiddleSegments()
+
// SetTestTarget sets the rip appropriately.
func SetTestTarget(regs *syscall.PtraceRegs, fn func()) {
regs.Rip = uint64(reflect.ValueOf(fn).Pointer())