mirror of
https://github.com/go-delve/delve.git
synced 2025-11-02 21:40:22 +08:00
proc/windows: handle delayed events
Sometimes windows will send us events about breakpoints we have already removed from the code despite the fact that we go to great lengths to avoid this already. Change waitForDebugEvent to check that when we receive a breakpoint event the corresponding memory actually contains an INT 3 instruction, if it doesn't ignore the event and restart the thread.
This commit is contained in:
@ -46,9 +46,12 @@ func TestBuild(t *testing.T) {
|
||||
assertNoError(err, t, "stdout pipe")
|
||||
cmd.Start()
|
||||
defer func() {
|
||||
cmd.Process.Signal(os.Interrupt)
|
||||
if runtime.GOOS != "windows" {
|
||||
cmd.Process.Signal(os.Interrupt)
|
||||
cmd.Wait()
|
||||
} else {
|
||||
// sending os.Interrupt on windows is not supported
|
||||
cmd.Process.Kill()
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user