delve/pkg/proc
Alessandro Arzilli 8bb93e9ae1
proc/gdbserial,debugger: allow clients to stop a recording (#1890)
Allows Delve clients to stop a recording midway by sending a
Command('halt')
request.

This is implemented by changing debugger.New to start recording the
process on a separate goroutine while holding the processMutex locked.
By locking the processMutex we ensure that almost all RPC requests will
block until the recording is done, since we can not respond correctly
to any of them.
API calls that do not require manipulating or examining the target
process, such as "IsMulticlient", "SetApiVersion" and
"GetState(nowait=true)" will work while we are recording the process.

Two other internal changes are made to the API: both GetState and
Restart become asynchronous requests, like Command. Restart because
this way it can be interrupted by a StopRecording request if the
rerecord option is passed.
GetState because clients need a call that will block until the
recording is compelted and can also be interrupted with a
StopRecording.

Clients that are uninterested in allowing the user to stop a recording
can ignore this change, since eventually they will make a request to
Delve that will block until the recording is completed.

Clients that wish to support this feature must:

1. call GetState(nowait=false) after connecting to Delve, before any
   call that would need to manipulate the target process
2. allow the user to send a StopRecording request during the initial
   GetState call
3. allow the user to send a StopRecording request during any subsequent
   Restart(rerecord=true) request (if supported).

Implements #1747
2020-03-24 09:09:28 -07:00
..
core *: Fix go vet complaints (#1935) 2020-03-18 09:25:32 -07:00
fbsdutil pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
gdbserial proc/gdbserial,debugger: allow clients to stop a recording (#1890) 2020-03-24 09:09:28 -07:00
linutil pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
native pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
test proc: fix bad cached goroutines after a call injection (#1926) 2020-03-19 12:27:31 -07:00
winutil proc: only format registers value when it's necessary (#1860) 2020-02-12 13:31:48 -08:00
amd64_arch.go *: Fix use of deprecated functionality 2020-03-20 09:05:14 +01:00
amd64_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
arm64_arch.go *: Fix use of deprecated functionality 2020-03-20 09:05:14 +01:00
arm64_disasm.go proc: build disassemblers unconditionally 2020-01-02 09:29:01 -08:00
bininfo.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
breakpoints.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
disasm.go pkg/proc: Judge the validity of addr ranges when disasm. (#1872) 2020-02-19 08:46:03 -08:00
doc.go Move top-level packages into pkg 2017-02-08 12:17:19 -08:00
dwarf_expr_test.go *: Fix go vet complaints (#1935) 2020-03-18 09:25:32 -07:00
eval.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
fncall.go proc,dwarf: cache debug.Entry objects (#1931) 2020-03-20 10:23:10 -07:00
goroutine_cache.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
i386_arch.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
i386_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
interface.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
mem.go More Function Calls, parts 2 (#1504) 2019-05-30 08:08:37 -07:00
moduledata.go proc: support DW_AT_go_package_name (#1757) 2019-11-25 09:10:18 -08:00
pe.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
proc_general_test.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00
proc_linux_test.go *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
proc_test.go pkg/proc: Reset time after continue in benchmarks 2020-03-24 09:48:34 +01:00
proc_unexported_test.go proc: allow calls to optimized functions (#1684) 2019-09-25 10:23:02 -07:00
proc_unix_test.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
proc.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
registers.go proc: only format registers value when it's necessary (#1860) 2020-02-12 13:31:48 -08:00
scope_test.go *: Fix go vet complaints (#1935) 2020-03-18 09:25:32 -07:00
stack.go proc: fix switch to goroutine stack (#1948) 2020-03-20 11:32:41 -07:00
target.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
threads.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
types.go proc: remove support for parsing interfaces in Go 1.8 and earlier (#1878) 2020-02-20 10:52:48 -08:00
variable_test.go pkg/proc: Introduce Target and remove CommonProcess (#1834) 2020-01-21 12:41:24 -08:00
variables.go pkg/proc: Clean up proc.go 2020-03-24 09:45:29 +01:00
x86_disasm.go pkg/proc,service: support linux/386 (#1884) 2020-03-10 09:34:40 -07:00