proc: fix interaction of RequestManualStop and conditional breakpoints (#876)

* proc: fix interaction of RequestManualStop and conditional breakpoints

A conditional breakpoint that is hit but has the condition evaluate to
false can block a RequestManualStop from working. If the conditional
breakpoint is set on an instruction that is executed very frequently by
multiple goroutines (or many conditional breakpoints are set) it could
prevent all calls to RequestManualStop from working.

This commit fixes the problem by changing proc.Continue to exit
unconditionally after a RequestManualStop is called.

* proc/gdbserial: fix ContinueOnce getting stuck on macOS

Fixes #902
This commit is contained in:
Alessandro Arzilli
2017-07-08 01:29:37 +02:00
committed by Derek Parker
parent 8276ba06cd
commit 07e53f7cbb
6 changed files with 87 additions and 7 deletions

View File

@ -87,6 +87,9 @@ type ProcessManipulation interface {
SwitchThread(int) error
SwitchGoroutine(int) error
RequestManualStop() error
// ManualStopRequested returns true the first time it's called after a call
// to RequestManualStop.
ManualStopRequested() bool
Halt() error
Kill() error
Detach(bool) error