delve/pkg/proc/gdbserial
Alessandro Arzilli f3e76238e3
proc: move breakpoint condition evaluation out of backends (#2628)
* proc: move breakpoint condition evaluation out of backends

Moves breakpoint condition evaluation from the point where breakpoints
are set, inside ContinueOnce, to (*Target).Continue.

This accomplishes three things:

1. the breakpoint evaluation method needs not be exported anymore
2. breakpoint condition evaluation can be done with a full scope,
   containing a Target object, something that wasn't possible before
   because ContinueOnce doesn't have access to the Target object.
3. moves breakpoint condition evaluation out of the critical section
   where some of the threads of the target process might be still
   running.

* proc/native: handle process death during stop() on Windows

It is possible that the thread dies while we are inside the stop()
function. This results in an Access is denied error being returned by
SuspendThread being called on threads that no longer exist.

Delay the reporting the error from SuspendThread until the end of
stop() and only report it if the thread still exists at that point.

Fixes flakyness with TestIssue1101 that was exacerbated by moving
breakpoint condition evaluation outside of the backends.
2021-08-09 10:16:24 -07:00
..
gdbserver_conn.go gdbserial,regnum: support ZMM registers, disable 'g' on debugserver (#2498) 2021-05-26 08:21:03 -07:00
gdbserver_unix.go *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
gdbserver_windows.go proc/native,proc/gdbserial: ignore SIGTTIN, SIGTTOU when fg'ing target 2018-07-31 12:05:54 -07:00
gdbserver.go proc: move breakpoint condition evaluation out of backends (#2628) 2021-08-09 10:16:24 -07:00
rr_test.go proc: allow multiple overlapping internal breakpoints (#2519) 2021-07-21 08:24:19 -07:00
rr.go service/dap: Support for replay and core modes (#2367) 2021-07-21 07:38:04 -07:00