parent
ee3d7e8d55
commit
d06abe3f2f
@ -91,6 +91,11 @@ func (d *Debugger) Restart() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("could not launch process: %s", err)
|
return fmt.Errorf("could not launch process: %s", err)
|
||||||
}
|
}
|
||||||
|
for addr, _ := range d.process.Breakpoints {
|
||||||
|
if _, err := p.SetBreakpoint(addr); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
d.process = p
|
d.process = p
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -101,12 +101,8 @@ func TestRestart_duringStop(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if len(bps) != 0 {
|
if len(bps) == 0 {
|
||||||
t.Fatal("breakpoint tabe not cleared")
|
t.Fatal("breakpoints not preserved")
|
||||||
}
|
|
||||||
state = <-c.Continue()
|
|
||||||
if !state.Exited {
|
|
||||||
t.Fatal("expected process to have exited")
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user