From 12d9b8069c57d0d26d0d956e5915eec4e58eb951 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Wed, 4 Mar 2020 10:21:29 -0800 Subject: [PATCH] pkg/proc: Add doc comments to Target Restart and Detach --- pkg/proc/target.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/proc/target.go b/pkg/proc/target.go index e97b117c..6a4bc43b 100644 --- a/pkg/proc/target.go +++ b/pkg/proc/target.go @@ -49,11 +49,18 @@ func (t *Target) ClearAllGCache() { t.gcache.Clear() } +// Restart will start the process over from the location specified by the "from" locspec. +// This is only useful for recorded targets. +// Restarting of a normal process happens at a higher level (debugger.Restart). func (t *Target) Restart(from string) error { t.ClearAllGCache() return t.Process.Restart(from) } +// Detach will detach the target from the underylying process. +// This means the debugger will no longer receive events from the process +// we were previously debugging. +// If kill is true then the process will be killed when we detach. func (t *Target) Detach(kill bool) error { if !kill && t.asyncPreemptChanged { setAsyncPreemptOff(t, t.asyncPreemptOff)