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

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