mirror of
https://github.com/go-delve/delve.git
synced 2025-11-03 22:08:33 +08:00
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:
committed by
Derek Parker
parent
8f0646e426
commit
f4aaffbbf3
@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"net/rpc"
|
||||
"net/rpc/jsonrpc"
|
||||
"time"
|
||||
|
||||
"github.com/derekparker/delve/service"
|
||||
"github.com/derekparker/delve/service/api"
|
||||
@ -37,14 +38,21 @@ func (c *RPCClient) ProcessPid() int {
|
||||
return out.Pid
|
||||
}
|
||||
|
||||
func (c *RPCClient) LastModified() time.Time {
|
||||
out := new(LastModifiedOut)
|
||||
c.call("LastModified", LastModifiedIn{}, out)
|
||||
return out.Time
|
||||
}
|
||||
|
||||
func (c *RPCClient) Detach(kill bool) error {
|
||||
out := new(DetachOut)
|
||||
return c.call("Detach", DetachIn{kill}, out)
|
||||
}
|
||||
|
||||
func (c *RPCClient) Restart() error {
|
||||
func (c *RPCClient) Restart() ([]api.DiscardedBreakpoint, error) {
|
||||
out := new(RestartOut)
|
||||
return c.call("Restart", RestartIn{}, out)
|
||||
err := c.call("Restart", RestartIn{}, out)
|
||||
return out.DiscardedBreakpoints, err
|
||||
}
|
||||
|
||||
func (c *RPCClient) GetState() (*api.DebuggerState, error) {
|
||||
|
||||
Reference in New Issue
Block a user