Two bugfixes regarding stale executable files, and executables changing between restarts (#689)

* service/debugger: Restore breakpoints using file:line on restart

Restoring by address can cause the breakpoint to be inserted in the
middle of an instruction if the executable file has changed.

* terminal: Warn of stale executable when printing source
This commit is contained in:
Alessandro Arzilli
2016-12-22 17:53:34 +01:00
committed by Derek Parker
parent 8f0646e426
commit f4aaffbbf3
12 changed files with 100 additions and 34 deletions

View File

@ -1,6 +1,8 @@
package service
import (
"time"
"github.com/derekparker/delve/service/api"
)
@ -10,11 +12,14 @@ type Client interface {
// Returns the pid of the process we are debugging.
ProcessPid() int
// LastModified returns the time that the process' executable was modified.
LastModified() time.Time
// Detach detaches the debugger, optionally killing the process.
Detach(killProcess bool) error
// Restarts program.
Restart() error
Restart() ([]api.DiscardedBreakpoint, error)
// GetState returns the current debugger state.
GetState() (*api.DebuggerState, error)