mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +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
@ -71,7 +71,7 @@ func TestRestart_afterExit(t *testing.T) {
|
||||
if !state.Exited {
|
||||
t.Fatal("expected initial process to have exited")
|
||||
}
|
||||
if err := c.Restart(); err != nil {
|
||||
if _, err := c.Restart(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if c.ProcessPid() == origPid {
|
||||
@ -124,7 +124,7 @@ func TestRestart_duringStop(t *testing.T) {
|
||||
if state.CurrentThread.Breakpoint == nil {
|
||||
t.Fatal("did not hit breakpoint")
|
||||
}
|
||||
if err := c.Restart(); err != nil {
|
||||
if _, err := c.Restart(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if c.ProcessPid() == origPid {
|
||||
|
||||
Reference in New Issue
Block a user