delve/pkg/proc/native
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
..
dump_linux_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_linux_other.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_linux.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_other.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
dump_windows_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
exec_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
exec_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc_user_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
mach_exc.h proc: refactoring: split backends to separate packages 2017-04-21 14:00:04 -07:00
nonative_darwin.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_darwin.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
proc_ebpf_linux.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_freebsd.c fix cast to smaller integer type 'int' from 'void *' (#2511) 2021-05-26 10:23:27 -07:00
proc_freebsd.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_freebsd.h fix cast to smaller integer type 'int' from 'void *' (#2511) 2021-05-26 10:23:27 -07:00
proc_linux.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_no_ebpf_linux.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
proc_unix.go *: Add --tty flag for debug / exec 2020-04-10 09:53:13 -07:00
proc_windows.go proc: move breakpoint condition evaluation out of backends (#2628) 2021-08-09 10:16:24 -07:00
proc.go *: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
ptrace_darwin.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
ptrace_freebsd_amd64.c *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd_amd64.h *: FreeBSD initial support (#1480) 2019-07-12 18:28:04 -07:00
ptrace_freebsd.go proc: use CPUID to determine maximum size of XSAVE area (#2256) 2020-12-14 09:39:01 -08:00
ptrace_linux_64bit.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
ptrace_linux_386.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
ptrace_linux_amd64.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
ptrace_linux.go *: un-export unnecessarily public symbols 2020-03-31 14:47:29 -07:00
register_linux_386.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
registers_darwin_amd64.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
registers_freebsd_amd64.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
registers_linux_amd64.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
registers_linux_arm64.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
registers_windows_amd64.go proc/*: implement proc.(*compositeMemory).WriteMemory (#2271) 2021-03-04 10:28:28 -08:00
support_sentinel.go proc/gdbserial: Added support for darwin/arm64 using gdbserver (#2285) 2021-01-04 08:52:04 -08:00
syscall_windows_amd64.go proc: move windows register handling code to winutil package 2018-11-21 12:17:16 -08:00
syscall_windows.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00
threads_darwin.c proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_darwin.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
threads_darwin.h proc/native,Makefile: allow compiling on macOS without native backend 2018-10-02 10:46:09 -07:00
threads_freebsd.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
threads_linux_386.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
threads_linux_amd64.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
threads_linux_arm64.go proc/native: low level support for watchpoints in linux/amd64 (#2301) 2021-05-06 10:33:56 -07:00
threads_linux.go pkg/proc/native/linux: fix target crashes induced by RequestManualStop (#2484) 2021-05-17 09:56:42 -07:00
threads_windows.go proc: move breakpoint condition evaluation out of backends (#2628) 2021-08-09 10:16:24 -07:00
threads.go proc: move breakpoint condition evaluation out of backends (#2628) 2021-08-09 10:16:24 -07:00
zsyscall_windows.go terminal,service,proc/*: adds dump command (gcore equivalent) (#2173) 2021-01-29 13:39:33 -08:00