pkg/proc: Add doc comments to Target Restart and Detach

This commit is contained in:
Derek Parker 2020-03-04 10:21:29 -08:00 committed by Alessandro Arzilli
parent f863be0a17
commit 12d9b8069c

@ -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)