Repository: go-delve/delve
Pull request #2848 (2021-12-30 17:43:54)

cmd/dlv: require arg for trace subcommand


Patch:
diff --git a/Documentation/api/README.md b/Documentation/api/README.md
index 916b7390..c98e3c78 100644
--- a/Documentation/api/README.md
+++ b/Documentation/api/README.md
@@ -1,20 +1,20 @@
-# API Documentation
+# Server/Client API Documentation
 
-Delve exposes an API interface so that other programs, mostly IDEs and editors, can interact with Delve programmatically. The API is used by the terminal client, so will always stay up to date in lockstep regardless of new features.
+Delve exposes two API interfaces, JSON-RPC and DAP, so that frontends other than the built-in [terminal client](../cli/README.md), such as [IDEs and editors](../EditorIntegration.md), can interact with Delve programmatically. The [JSON-RPC API](json-rpc/README.md) is used by the [terminal client](../cli/README.md), and will always stay up to date in lockstep regardless of new features. The [DAP API](dap/README.md) is a popular generic API already in use by many [tools](https://microsoft.github.io/debug-adapter-protocol/implementors/tools/).
 
 ## Usage
 
 In order to run Delve in "API mode", simply invoke with one of the standard commands, providing the `--headless` flag, like so:
 
 ```
-$ dlv debug --headless --api-version=2 --log --listen=127.0.0.1:8181
+$ dlv debug --headless --api-version=2 --log --log-output=debugger,dap,rpc --listen=127.0.0.1:8181
 ```
 
-This will start the debugger in a non-interactive mode, listening on the specified address, and will enable logging. The last two flags are optional, of course.
+This will start the debugger in a non-interactive mode, listening on the specified address, and will enable logging. The logging flags as well as the server address are optional, of course.
 
-Optionally, you may also specify the `--accept-multiclient` flag if you would like to connect multiple clients to the API.
+Optionally, you may also specify the `--accept-multiclient` flag if you would like to connect multiple JSON-RPC or DAP clients to the API.
 
-You can connect the headless debugger from Delve itself using the `connect` subcommand:
+You can connect to the headless debugger from Delve itself using the `connect` subcommand:
 
 ```
 $ dlv connect 127.0.0.1:8181
@@ -29,3 +29,4 @@ Delve has been architected in such a way as to allow multiple client/server impl
 ### Current API Interfaces
 
 - [JSON-RPC](json-rpc/README.md)
+- [DAP](dap/README.md)
diff --git a/Documentation/api/dap/README.md b/Documentation/api/dap/README.md
new file mode 100644
index 00000000..a03b5955
--- /dev/null
+++ b/Documentation/api/dap/README.md
@@ -0,0 +1,116 @@
+# DAP Interface
+
+Delve exposes a [DAP](https://microsoft.github.io/debug-adapter-protocol/overview) API interface.
+
+This interface is served over a streaming TCP socket using `dlv` server in one of the two headless modes:
+* `dlv dap` - starts a single-use DAP-only server that waits for a client to specify launch/attach configuration for starting the debug session.
+* `dlv --headless <command> <debugee>` - starts a general server, enters a debug session for the specified debuggee and waits for a [JSON-RPC](../json-rpc/README.md) or a [DAP](https://microsoft.github.io/debug-adapter-protocol/overview) client to begin interactive debugging. Can be used in multi-client mode with the following options:
+   *  `--accept-multiclient` - use to support connections from multiple clients
+   *  `--continue` - use to resume debuggee execution as soon as server session starts
+
+The primary user of this mode is [VS Code Go](https://github.com/golang/vscode-go). Please see its 
+detailed [debugging documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) for additional information.
+
+## Debug Adapter Protocol
+
+[DAP](https://microsoft.github.io/debug-adapter-protocol/specification) is a general debugging protocol supported by many [tools](https://microsoft.github.io/debug-adapter-protocol/implementors/tools/) and [programming languages](https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/). We tailored it to Go specifics, such as mapping [threads request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Threads) to communicate goroutines and [exceptionInfo request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_ExceptionInfo) to support panics and fatal errors.
+
+See [dap.Server.handleRequest](https://github.com/go-delve/delve/search?q=handleRequest) and capabilities set in [dap.Server.onInitializeRequest](https://github.com/go-delve/delve/search?q=onInitializeRequest) for an up-to-date list of supported requests and options.
+
+## Launch and Attach Configurations
+
+In addition to the general [DAP spec](https://microsoft.github.io/debug-adapter-protocol/specification), the server supports the following implementation-specific configuration options for starting the debug session:
+   * [AttachRequestArguments](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Attach) - see [AttachConfig godoc](https://pkg.go.dev/github.com/go-delve/delve/service/dap#AttachConfig)
+   * [LaunchRequestArguments](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Launch) - see [LaunchConfig godoc](https://pkg.go.dev/github.com/go-delve/delve/service/dap#LaunchConfig)
+
+Not all of the configurations are supported by each of the two available DAP servers:
+
+<table border=1>
+<tr>
+<th>request<th>"mode":<th>`dlv dap`<th>`dlv --headless`
+</tr>
+<tr>
+<td>launch<td>"debug"<br>"test"<br>"exec"<br>...<td>supported<td>NOT supported
+<tr>
+<td>attach<td>"local"<td>supported<td>NOT supported
+</tr>
+<tr>
+<td>attach<td>"remote"<td>NOT supported<td>supported
+</tr>
+</table>
+
+## Disconnect and Shutdown
+
+### Single-Client Mode
+
+When used with `dlv dap` or `dlv --headless --accept-multiclient=false` (default), the DAP server will shut itself down at the end of the debug session, when the client sends a [disconnect request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect). If the debuggee was launched, it will be taken down as well. If the debugee was attached to, `terminateDebuggee` option will be respected.
+
+When the program terminates, we send a [terminated event](https://microsoft.github.io/debug-adapter-protocol/specification#Events_Terminated), which is expected to trigger a [disconnect request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect) from the client for a session and a server shutdown. The [restart request](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart) is not yet supported. 
+
+The server also shuts down in case of a client connection error or SIGTERM signal, taking down a launched process, but letting an attached process continue. 
+
+Pressing Ctrl-C on the terminal where a headless server is running sends SIGINT to the debuggee, foregrounded in headless mode to support debugging interactive programs.
+
+### Multi-Client Mode
+
+When used with `dlv --headless --accept-multiclient=true`, the DAP server will honor the multi-client mode when a client [disconnects](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect)) or client connection fails. The server will remain running and ready for a new client connection, and the debuggee will remain in whatever state it was at the time of disconnect - running or halted. Once [`suspendDebuggee`](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect) option is supported by frontends like VS Code ([vscode/issues/134412](https://github.com/microsoft/vscode/issues/134412)), we will update the server to offer this as a way to specify debuggee state on disconnect.
+
+The client may request full shutdown of the server and the debuggee with [`terminateDebuggee`](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect) option.
+
+The server shuts down in response to a SIGTERM signal, taking down a launched process, but letting an attached process continue.
+
+Pressing Ctrl-C on the terminal where a headless server is running sends SIGINT to the debuggee, foregrounded in headless mode to support debugging interactive programs.
+
+## Debugger Output
+
+The debugger always logs one of the following on start-up to stdout:
+* `dlv dap`:
+   * `DAP server listening at: <host>:<port>`
+* `dlv --headless`: 
+   * `API server listening at: <host>:<port>`
+
+This can be used to confirm that server start-up succeeded.
+
+The server uses [output events](https://microsoft.github.io/debug-adapter-protocol/specification#Events_Output) to communicate errors and select status messages to the client. For example:
+
+```
+Step interrupted by a breakpoint. Use 'Continue' to resume the original step command.
+invalid command: Unable to step while the previous step is interrupted by a breakpoint.
+Use 'Continue' to resume the original step command.
+Detaching and terminating target process
+```
+
+More detailed logging can be enabled with `--log --log-output=dap` as part of the [`dlv` command](../../usage/dlv.md).
+It will record the server-side DAP message traffic. For example, 
+```
+2022-01-04T00:27:57-08:00 debug layer=dap [<- from client]{"seq":1,"type":"request","command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"go","locale":"en-us","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path","supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"supportsMemoryReferences":true,"supportsProgressReporting":true,"supportsInvalidatedEvent":true}}
+2022-01-04T00:27:57-08:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":true,"supportsConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":true,"supportsLogPoints":true,"supportsDisassembleRequest":true,"supportsClipboardContext":true,"supportsSteppingGranularity":true,"supportsInstructionBreakpoints":true}}
+2022-01-04T00:27:57-08:00 debug layer=dap [<- from client]{"seq":2,"type":"request","command":"launch","arguments":{"name":"Launch file","type":"go","request":"launch","mode":"debug","program":"./temp.go","hideSystemGoroutines":true,"__buildDir":"/Users/polina/go/src","__sessionId":"2ad0f0c1-a1fd-4fff-9fff-b8bc9a933fe5"}}
+2022-01-04T00:27:57-08:00 debug layer=dap parsed launch config: {
+	"mode": "debug",
+	"program": "./temp.go",
+	"backend": "default",
+	"stackTraceDepth": 50,
+	"hideSystemGoroutines": true
+}
+...
+```
+This logging is written to stderr and is not forwarded via 
+[output events](https://microsoft.github.io/debug-adapter-protocol/specification#Events_Output).
+
+## Debuggee Output
+
+Debuggee's stdout and stderr are written to stdout and stderr respectfully and are not forwarded via 
+[output events](https://microsoft.github.io/debug-adapter-protocol/specification#Events_Output).
+
+## Versions
+
+The initial DAP support was released in v1.6.1 with many additional improvements in subsequent versions. The [remote attach](https://github.com/go-delve/delve/issues/2328) support was added in v1.7.3.
+
+The DAP API changes are backward-compatible as all new features are opt-in only. To update to a new [DAP version](https://microsoft.github.io/debug-adapter-protocol/changelog) and import a new DAP feature into delve, 
+one must first update the [go-dap](https://github.com/google/go-dap) dependency.
+
+<!--- TODO:
+- most requests are handled synchronously and block
+- hence many commands not supported when running, but setting breakpoints is
+--->
\ No newline at end of file
diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md
index 53f6c84a..c7fa5c51 100644
--- a/Documentation/cli/README.md
+++ b/Documentation/cli/README.md
@@ -16,7 +16,7 @@ Command | Description
 [rebuild](#rebuild) | Rebuild the target executable and restarts it. It does not work if the executable was not built by delve.
 [restart](#restart) | Restart process.
 [rev](#rev) | Reverses the execution of the target program for the command specified.
-[rewind](#rewind) | Run backwards until breakpoint or program termination.
+[rewind](#rewind) | Run backwards until breakpoint or start of recorded history.
 [step](#step) | Single step through program.
 [step-instruction](#step-instruction) | Single step a single cpu instruction.
 [stepout](#stepout) | Step out of the current function.
@@ -91,6 +91,7 @@ Command | Description
 [list](#list) | Show source code.
 [source](#source) | Executes a file containing a list of delve commands
 [sources](#sources) | Print list of source files.
+[transcript](#transcript) | Appends command output to a file.
 [types](#types) | Print list of types
 
 ## args
@@ -104,9 +105,9 @@ If regex is specified only function arguments with a name matching it will be re
 ## break
 Sets a breakpoint.
 
-	break [name] <linespec>
+	break [name] [linespec]
 
-See [Documentation/cli/locspec.md](//github.com/go-delve/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec.
+See [Documentation/cli/locspec.md](//github.com/go-delve/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec. If linespec is omitted a breakpoint will be set on the current line.
 
 See also: "help on", "help cond" and "help clear"
 
@@ -545,7 +546,7 @@ Currently, only the rev step-instruction command is supported.
 
 
 ## rewind
-Run backwards until breakpoint or program termination.
+Run backwards until breakpoint or start of recorded history.
 
 Aliases: rw
 
@@ -628,14 +629,25 @@ toggle <breakpoint name or id>
 ## trace
 Set tracepoint.
 
-	trace [name] <linespec>
+	trace [name] [linespec]
 
-A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See [Documentation/cli/locspec.md](//github.com/go-delve/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec.
+A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See [Documentation/cli/locspec.md](//github.com/go-delve/delve/tree/master/Documentation/cli/locspec.md) for the syntax of linespec. If linespec is omitted a tracepoint will be set on the current line.
 
 See also: "help on", "help cond" and "help clear"
 
 Aliases: t
 
+## transcript
+Appends command output to a file.
+
+	transcript [-t] [-x] <output file>
+	transcript -off
+
+Output of Delve's command is appended to the specified output file. If '-t' is specified and the output file exists it is truncated. If '-x' is specified output to stdout is suppressed instead.
+
+Using the -off option disables the transcript.
+
+
 ## types
 Print list of types
 
diff --git a/Documentation/cli/starlark.md b/Documentation/cli/starlark.md
index a78f36ae..6a36ebce 100644
--- a/Documentation/cli/starlark.md
+++ b/Documentation/cli/starlark.md
@@ -152,7 +152,7 @@ def main():
 Use it like this:
 
 ```
-(dlv) source goroutine_start_line.start
+(dlv) source goroutine_start_line.star
 (dlv) goroutine_start_line
 1 	 /usr/local/go/src/runtime/proc.go:110 	 func main() {
 2 	 /usr/local/go/src/runtime/proc.go:242 	 func forcegchelper() {
diff --git a/Documentation/usage/README.md b/Documentation/usage/README.md
index 3bc7c5b0..851fda7b 100644
--- a/Documentation/usage/README.md
+++ b/Documentation/usage/README.md
@@ -1,5 +1,35 @@
 # Using Delve
 
-You can invoke Delve in multiple ways, depending on your usage needs. Delve makes every attempt to be user-friendly, ensuring the user has to do the least amount of work possible to begin debugging their program.
+You can invoke Delve in [multiple ways](dlv.md), depending on your usage needs. Delve makes every attempt to be user-friendly, ensuring the user has to do the least amount of work possible to begin debugging their program.
 
-Refer to the [main usage document](dlv.md) to further explore commands.
+The [available commands](dlv.md) can be grouped into the following categories:
+
+*  Specify target and start debugging with the default [terminal interface](../cli/README.md):
+   * [dlv debug [package]](dlv_debug.md)
+   * [dlv test [package]](dlv_test.md)
+   * [dlv exec \<exe\>](dlv_exec.md)
+   * [dlv attach \<pid\>](dlv_attach.md)
+   * [dlv core \<exe\> \<core\>](dlv_core.md)
+   * [dlv replay \<rr trace\> ](dlv_replay.md)
+* Trace target program execution
+   * [dlv trace [package] \<regexp\>](dlv_trace.md)
+* Start a headless backend server only and connect with an external [frontend client](../EditorIntegration.md):
+   * [dlv **--headless** \<command\> \<target\> \<args\> ](../api/ClientHowto.md#spawning-the-backend)
+      * starts a server, enters a debug session for the specified target and waits to accept a client connection over JSON-RPC or DAP
+      * `<command>` can be any of `debug`, `test`, `exec`, `attach`, `core` or `replay`
+      * if `--headless` flag is not specified the default [terminal client](../cli/README.md) will be automatically started instead
+      * compatible with [dlv connect](dlv_connect.md), [VS Code Go](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging), [GoLand](https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#attach-to-a-process-on-a-remote-machine)
+   * [dlv dap](dlv_dap.md)
+      * starts a DAP-only server and waits for a DAP client connection to specify the target and arguments
+      * compatible with [VS Code Go](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging)
+      * NOT compatible with [dlv connect](dlv_connect.md), [GoLand](https://www.jetbrains.com/help/go/attach-to-running-go-processes-with-debugger.html#attach-to-a-process-on-a-remote-machine)
+   * [dlv connect \<addr\>](dlv_connect.md)
+      * starts a [terminal interface client](../cli/README.md) and connects it to a running headless server over JSON-RPC
+* Help information
+   * [dlv help [command]](dlv.md)
+   * [dlv log](dlv_log.md)
+   * [dlv backend](dlv_backend.md)
+   * [dlv redirect](dlv_redirect.md)
+   * [dlv version](dlv_version.md)
+
+The above list may be incomplete. Refer to the auto-generated [complete usage document](dlv.md) to further explore all available commands.
diff --git a/Documentation/usage/dlv.md b/Documentation/usage/dlv.md
index 7ec447aa..5e75d2a3 100644
--- a/Documentation/usage/dlv.md
+++ b/Documentation/usage/dlv.md
@@ -18,14 +18,14 @@ Pass flags to the program you are debugging using `--`, for example:
 ### Options
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
   -h, --help                             help for dlv
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
@@ -40,9 +40,9 @@ Pass flags to the program you are debugging using `--`, for example:
 ### SEE ALSO
 
 * [dlv attach](dlv_attach.md)	 - Attach to running process and begin debugging.
-* [dlv connect](dlv_connect.md)	 - Connect to a headless debug server.
+* [dlv connect](dlv_connect.md)	 - Connect to a headless debug server with a terminal client.
 * [dlv core](dlv_core.md)	 - Examine a core dump.
-* [dlv dap](dlv_dap.md)	 - [EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
+* [dlv dap](dlv_dap.md)	 - Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
 * [dlv debug](dlv_debug.md)	 - Compile and begin debugging main package in current directory, or the package specified.
 * [dlv exec](dlv_exec.md)	 - Execute a precompiled binary, and begin a debug session.
 * [dlv replay](dlv_replay.md)	 - Replays a rr trace.
diff --git a/Documentation/usage/dlv_attach.md b/Documentation/usage/dlv_attach.md
index b98d0fd8..3b9c22de 100644
--- a/Documentation/usage/dlv_attach.md
+++ b/Documentation/usage/dlv_attach.md
@@ -25,14 +25,14 @@ dlv attach pid [executable] [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_backend.md b/Documentation/usage/dlv_backend.md
index 009f4094..3ccc9ba9 100644
--- a/Documentation/usage/dlv_backend.md
+++ b/Documentation/usage/dlv_backend.md
@@ -23,14 +23,14 @@ are:
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_connect.md b/Documentation/usage/dlv_connect.md
index 096e57e4..266e3cce 100644
--- a/Documentation/usage/dlv_connect.md
+++ b/Documentation/usage/dlv_connect.md
@@ -1,10 +1,10 @@
 ## dlv connect
 
-Connect to a headless debug server.
+Connect to a headless debug server with a terminal client.
 
 ### Synopsis
 
-Connect to a running headless debug server.
+Connect to a running headless debug server with a terminal client.
 
 ```
 dlv connect addr [flags]
@@ -19,14 +19,14 @@ dlv connect addr [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_core.md b/Documentation/usage/dlv_core.md
index cb69b87e..51a2c334 100644
--- a/Documentation/usage/dlv_core.md
+++ b/Documentation/usage/dlv_core.md
@@ -25,14 +25,14 @@ dlv core <executable> <core> [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_dap.md b/Documentation/usage/dlv_dap.md
index a929c692..b76fbe1f 100644
--- a/Documentation/usage/dlv_dap.md
+++ b/Documentation/usage/dlv_dap.md
@@ -1,22 +1,24 @@
 ## dlv dap
 
-[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
+Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
 
 ### Synopsis
 
-[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
+Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
 
-The server is always headless and requires a DAP client like vscode to connect and request a binary
-to be launched or process to be attached to. The following modes can be specified via client's launch config:
-- launch + exec (executes precompiled binary, like 'dlv exec')
-- launch + debug (builds and launches, like 'dlv debug')
-- launch + test (builds and tests, like 'dlv test')
+The server is always headless and requires a DAP client like VS Code to connect and request a binary
+to be launched or a process to be attached to. The following modes can be specified via the client's launch config:
+- launch + exec   (executes precompiled binary, like 'dlv exec')
+- launch + debug  (builds and launches, like 'dlv debug')
+- launch + test   (builds and tests, like 'dlv test')
 - launch + replay (replays an rr trace, like 'dlv replay')
-- launch + core (replays a core dump file, like 'dlv core')
-- attach + local (attaches to a running process, like 'dlv attach')
+- launch + core   (replays a core dump file, like 'dlv core')
+- attach + local  (attaches to a running process, like 'dlv attach')
+
 Program and output binary paths will be interpreted relative to dlv's working directory.
 
-The server does not yet accept multiple client connections (--accept-multiclient).
+This server does not accept multiple client connections (--accept-multiclient).
+Use 'dlv [command] --headless' instead and a DAP client with attach + remote config.
 While --continue is not supported, stopOnEntry launch/attach attribute can be used to control if
 execution is resumed at the start of the debug session.
 
@@ -38,14 +40,14 @@ dlv dap [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_debug.md b/Documentation/usage/dlv_debug.md
index b50413c2..718ae476 100644
--- a/Documentation/usage/dlv_debug.md
+++ b/Documentation/usage/dlv_debug.md
@@ -27,14 +27,14 @@ dlv debug [package] [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_exec.md b/Documentation/usage/dlv_exec.md
index 06f007e3..38e0716b 100644
--- a/Documentation/usage/dlv_exec.md
+++ b/Documentation/usage/dlv_exec.md
@@ -27,14 +27,14 @@ dlv exec <path/to/binary> [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_log.md b/Documentation/usage/dlv_log.md
index d925a7ea..39f92e15 100644
--- a/Documentation/usage/dlv_log.md
+++ b/Documentation/usage/dlv_log.md
@@ -38,14 +38,14 @@ and dap modes.
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_redirect.md b/Documentation/usage/dlv_redirect.md
index ca50e505..940b1359 100644
--- a/Documentation/usage/dlv_redirect.md
+++ b/Documentation/usage/dlv_redirect.md
@@ -26,14 +26,14 @@ File redirects can also be changed using the 'restart' command.
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_replay.md b/Documentation/usage/dlv_replay.md
index 89832fd0..fcc995b8 100644
--- a/Documentation/usage/dlv_replay.md
+++ b/Documentation/usage/dlv_replay.md
@@ -23,14 +23,14 @@ dlv replay [trace directory] [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_run.md b/Documentation/usage/dlv_run.md
index c2db3e45..6ab4b674 100644
--- a/Documentation/usage/dlv_run.md
+++ b/Documentation/usage/dlv_run.md
@@ -15,14 +15,14 @@ dlv run [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_trace.md b/Documentation/usage/dlv_trace.md
index fa50aa78..67a60156 100644
--- a/Documentation/usage/dlv_trace.md
+++ b/Documentation/usage/dlv_trace.md
@@ -33,14 +33,14 @@ dlv trace [package] regexp [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/Documentation/usage/dlv_version.md b/Documentation/usage/dlv_version.md
index 1a21d194..b1d2101c 100644
--- a/Documentation/usage/dlv_version.md
+++ b/Documentation/usage/dlv_version.md
@@ -16,14 +16,14 @@ dlv version [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/_fixtures/doubleinline.go b/_fixtures/doubleinline.go
new file mode 100644
index 00000000..6a73c596
--- /dev/null
+++ b/_fixtures/doubleinline.go
@@ -0,0 +1,26 @@
+package main
+
+import (
+	"fmt"
+	"runtime"
+	"strconv"
+)
+
+type Rectangle struct{}
+
+func (r *Rectangle) Height() int {
+	h, _ := strconv.ParseInt("7", 10, 0)
+	return int(h)
+}
+
+func (r *Rectangle) Width() int {
+	return 6
+}
+
+func (r *Rectangle) Area() int { return r.Height() * r.Width() }
+
+func main() {
+	var r Rectangle
+	runtime.Breakpoint()
+	fmt.Println(r.Area())
+}
diff --git a/cmd/dlv/cmds/commands.go b/cmd/dlv/cmds/commands.go
index 15df5f63..a25bf727 100644
--- a/cmd/dlv/cmds/commands.go
+++ b/cmd/dlv/cmds/commands.go
@@ -133,9 +133,9 @@ func New(docCall bool) *cobra.Command {
 	rootCommand.PersistentFlags().StringVarP(&logOutput, "log-output", "", "", `Comma separated list of components that should produce debug output (see 'dlv help log')`)
 	rootCommand.PersistentFlags().StringVarP(&logDest, "log-dest", "", "", "Writes logs to the specified file or file descriptor (see 'dlv help log').")
 
-	rootCommand.PersistentFlags().BoolVarP(&headless, "headless", "", false, "Run debug server only, in headless mode.")
-	rootCommand.PersistentFlags().BoolVarP(&acceptMulti, "accept-multiclient", "", false, "Allows a headless server to accept multiple client connections.")
-	rootCommand.PersistentFlags().IntVar(&apiVersion, "api-version", 1, "Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md.")
+	rootCommand.PersistentFlags().BoolVarP(&headless, "headless", "", false, "Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.")
+	rootCommand.PersistentFlags().BoolVarP(&acceptMulti, "accept-multiclient", "", false, "Allows a headless server to accept multiple client connections via JSON-RPC or DAP.")
+	rootCommand.PersistentFlags().IntVar(&apiVersion, "api-version", 1, "Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md.")
 	rootCommand.PersistentFlags().StringVar(&initFile, "init", "", "Init file, executed by the terminal client.")
 	rootCommand.PersistentFlags().StringVar(&buildFlags, "build-flags", buildFlagsDefault, "Build flags, to be passed to the compiler. For example: --build-flags=\"-tags=integration -mod=vendor -cover -v\"")
 	rootCommand.PersistentFlags().StringVar(&workingDir, "wd", "", "Working directory for running the program.")
@@ -170,8 +170,8 @@ option to let the process continue or kill it.
 	// 'connect' subcommand.
 	connectCommand := &cobra.Command{
 		Use:   "connect addr",
-		Short: "Connect to a headless debug server.",
-		Long:  "Connect to a running headless debug server.",
+		Short: "Connect to a headless debug server with a terminal client.",
+		Long:  "Connect to a running headless debug server with a terminal client.",
 		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
 			if len(args) == 0 {
 				return errors.New("you must provide an address as the first argument")
@@ -185,20 +185,22 @@ option to let the process continue or kill it.
 	// 'dap' subcommand.
 	dapCommand := &cobra.Command{
 		Use:   "dap",
-		Short: "[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).",
-		Long: `[EXPERIMENTAL] Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
-
-The server is always headless and requires a DAP client like vscode to connect and request a binary
-to be launched or process to be attached to. The following modes can be specified via client's launch config:
-- launch + exec (executes precompiled binary, like 'dlv exec')
-- launch + debug (builds and launches, like 'dlv debug')
-- launch + test (builds and tests, like 'dlv test')
+		Short: "Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).",
+		Long: `Starts a headless TCP server communicating via Debug Adaptor Protocol (DAP).
+
+The server is always headless and requires a DAP client like VS Code to connect and request a binary
+to be launched or a process to be attached to. The following modes can be specified via the client's launch config:
+- launch + exec   (executes precompiled binary, like 'dlv exec')
+- launch + debug  (builds and launches, like 'dlv debug')
+- launch + test   (builds and tests, like 'dlv test')
 - launch + replay (replays an rr trace, like 'dlv replay')
-- launch + core (replays a core dump file, like 'dlv core')
-- attach + local (attaches to a running process, like 'dlv attach')
+- launch + core   (replays a core dump file, like 'dlv core')
+- attach + local  (attaches to a running process, like 'dlv attach')
+
 Program and output binary paths will be interpreted relative to dlv's working directory.
 
-The server does not yet accept multiple client connections (--accept-multiclient).
+This server does not accept multiple client connections (--accept-multiclient).
+Use 'dlv [command] --headless' instead and a DAP client with attach + remote config.
 While --continue is not supported, stopOnEntry launch/attach attribute can be used to control if
 execution is resumed at the start of the debug session.
 
@@ -568,10 +570,14 @@ func traceCmd(cmd *cobra.Command, args []string) {
 
 		dlvArgs, targetArgs := splitArgs(cmd, args)
 		var dlvArgsLen = len(dlvArgs)
-		if dlvArgsLen == 1 {
+		switch dlvArgsLen {
+		case 0:
+			fmt.Fprintf(os.Stderr, "you must supply a regexp for functions to trace\n")
+			return 1
+		case 1:
 			regexp = args[0]
 			dlvArgs = dlvArgs[0:0]
-		} else if dlvArgsLen >= 2 {
+		default:
 			regexp = dlvArgs[dlvArgsLen-1]
 			dlvArgs = dlvArgs[:dlvArgsLen-1]
 		}
@@ -630,8 +636,7 @@ func traceCmd(cmd *cobra.Command, args []string) {
 			if traceUseEBPF {
 				err := client.CreateEBPFTracepoint(funcs[i])
 				if err != nil {
-					fmt.Fprintln(os.Stderr, err)
-					return 1
+					fmt.Fprintf(os.Stderr, "unable to set tracepoint on function %s: %#v\n", funcs[i], err)
 				}
 			} else {
 				// Fall back to breakpoint based tracing if we get an error.
@@ -643,13 +648,11 @@ func traceCmd(cmd *cobra.Command, args []string) {
 					LoadArgs:     &terminal.ShortLoadConfig,
 				})
 				if err != nil && !isBreakpointExistsErr(err) {
-					fmt.Fprintln(os.Stderr, err)
-					return 1
+					fmt.Fprintf(os.Stderr, "unable to set tracepoint on function %s: %#v\n", funcs[i], err)
 				}
 				addrs, err := client.FunctionReturnLocations(funcs[i])
 				if err != nil {
-					fmt.Fprintln(os.Stderr, err)
-					return 1
+					fmt.Fprintf(os.Stderr, "unable to set tracepoint on function %s: %#v\n", funcs[i], err)
 				}
 				for i := range addrs {
 					_, err = client.CreateBreakpoint(&api.Breakpoint{
@@ -660,14 +663,14 @@ func traceCmd(cmd *cobra.Command, args []string) {
 						LoadArgs:    &terminal.ShortLoadConfig,
 					})
 					if err != nil && !isBreakpointExistsErr(err) {
-						fmt.Fprintln(os.Stderr, err)
-						return 1
+						fmt.Fprintf(os.Stderr, "unable to set tracepoint on function %s: %#v\n", funcs[i], err)
 					}
 				}
 			}
 		}
 		cmds := terminal.DebugCommands(client)
 		t := terminal.New(client, nil)
+		t.RedirectTo(os.Stderr)
 		defer t.Close()
 		if traceUseEBPF {
 			done := make(chan struct{})
diff --git a/go.mod b/go.mod
index 8eb5d769..325c174a 100644
--- a/go.mod
+++ b/go.mod
@@ -11,13 +11,13 @@ require (
 	github.com/hashicorp/golang-lru v0.5.4
 	github.com/mattn/go-colorable v0.0.9
 	github.com/mattn/go-isatty v0.0.3
-	github.com/peterh/liner v1.2.1
+	github.com/peterh/liner v1.2.2
 	github.com/sirupsen/logrus v1.6.0
 	github.com/spf13/cobra v1.1.3
 	github.com/stretchr/testify v1.7.0 // indirect
 	go.starlark.net v0.0.0-20200821142938-949cc6f4b097
 	golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
-	golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
+	golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
 	golang.org/x/tools v0.1.8
 	gopkg.in/yaml.v2 v2.4.0
 )
diff --git a/go.sum b/go.sum
index e79c3fd9..8f910296 100644
--- a/go.sum
+++ b/go.sum
@@ -153,6 +153,8 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
 github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg=
 github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
+github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
+github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@@ -281,6 +283,8 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
 golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
+golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/pkg/proc/bininfo.go b/pkg/proc/bininfo.go
index 7d2e6839..4b93cbb1 100644
--- a/pkg/proc/bininfo.go
+++ b/pkg/proc/bininfo.go
@@ -1241,7 +1241,7 @@ func (bi *BinaryInfo) openSeparateDebugInfo(image *Image, exe *elf.File, debugIn
 			if err != nil {
 				return nil, nil, ErrNoDebugInfoFound
 			}
-			debugFilePath = string(out)
+			debugFilePath = strings.TrimSpace(string(out))
 		} else {
 			return nil, nil, ErrNoDebugInfoFound
 		}
@@ -1367,7 +1367,7 @@ func loadBinaryInfoElf(bi *BinaryInfo, image *Image, path string, addr uint64, w
 	image.debugLineStr = debugLineStrBytes
 
 	wg.Add(3)
-	go bi.parseDebugFrameElf(image, dwarfFile, debugInfoBytes, wg)
+	go bi.parseDebugFrameElf(image, dwarfFile, elfFile, debugInfoBytes, wg)
 	go bi.loadDebugInfoMaps(image, debugInfoBytes, debugLineBytes, wg, nil)
 	go bi.loadSymbolName(image, elfFile, wg)
 	if image.index == 0 {
@@ -1395,11 +1395,11 @@ func (bi *BinaryInfo) loadSymbolName(image *Image, file *elf.File, wg *sync.Wait
 	}
 }
 
-func (bi *BinaryInfo) parseDebugFrameElf(image *Image, exe *elf.File, debugInfoBytes []byte, wg *sync.WaitGroup) {
+func (bi *BinaryInfo) parseDebugFrameElf(image *Image, dwarfFile, exeFile *elf.File, debugInfoBytes []byte, wg *sync.WaitGroup) {
 	defer wg.Done()
 
-	debugFrameData, debugFrameErr := godwarf.GetDebugSectionElf(exe, "frame")
-	ehFrameSection := exe.Section(".eh_frame")
+	debugFrameData, debugFrameErr := godwarf.GetDebugSectionElf(dwarfFile, "frame")
+	ehFrameSection := exeFile.Section(".eh_frame")
 	var ehFrameData []byte
 	var ehFrameAddr uint64
 	if ehFrameSection != nil {
@@ -2069,7 +2069,7 @@ func (bi *BinaryInfo) loadDebugInfoMapsCompileUnit(ctxt *loadDebugInfoMapsContex
 		case dwarf.TagSubprogram:
 			inlined := false
 			if inval, ok := entry.Val(dwarf.AttrInline).(int64); ok {
-				inlined = inval == 1
+				inlined = inval >= 1
 			}
 
 			if inlined {
@@ -2262,6 +2262,10 @@ func (bi *BinaryInfo) loadDebugInfoMapsInlinedCalls(ctxt *loadDebugInfoMapsConte
 
 			fl := fileLine{callfile, int(callline)}
 			bi.inlinedCallLines[fl] = append(bi.inlinedCallLines[fl], lowpc)
+
+			if entry.Children {
+				bi.loadDebugInfoMapsInlinedCalls(ctxt, reader, cu)
+			}
 		}
 		reader.SkipChildren()
 	}
diff --git a/pkg/proc/internal/ebpf/bpf/trace.bpf.c b/pkg/proc/internal/ebpf/bpf/trace.bpf.c
index bce79917..d4b27760 100644
--- a/pkg/proc/internal/ebpf/bpf/trace.bpf.c
+++ b/pkg/proc/internal/ebpf/bpf/trace.bpf.c
@@ -244,4 +244,4 @@ int uprobe__dlv_trace(struct pt_regs *ctx) {
     return 0;
 }
 
-char _license[] SEC("license") = "GPL";
\ No newline at end of file
+char _license[] SEC("license") = "Dual MIT/GPL";
diff --git a/pkg/proc/native/proc.go b/pkg/proc/native/proc.go
index 071cac7c..d9d883a9 100644
--- a/pkg/proc/native/proc.go
+++ b/pkg/proc/native/proc.go
@@ -282,7 +282,8 @@ func (dbp *nativeProcess) initialize(path string, debugInfoDirs []string) (*proc
 		DisableAsyncPreempt: runtime.GOOS == "windows" || runtime.GOOS == "freebsd" || (runtime.GOOS == "linux" && runtime.GOARCH == "arm64"),
 
 		StopReason: stopReason,
-		CanDump:    runtime.GOOS == "linux"})
+		CanDump:    runtime.GOOS == "linux" || runtime.GOOS == "windows",
+	})
 	if err != nil {
 		return nil, err
 	}
diff --git a/pkg/proc/target.go b/pkg/proc/target.go
index 66e61d71..13ba6670 100644
--- a/pkg/proc/target.go
+++ b/pkg/proc/target.go
@@ -144,7 +144,7 @@ const (
 	StopBreakpoint                     // The target process hit one or more software breakpoints
 	StopHardcodedBreakpoint            // The target process hit a hardcoded breakpoint (for example runtime.Breakpoint())
 	StopManual                         // A manual stop was requested
-	StopNextFinished                   // The next/step/stepout command terminated
+	StopNextFinished                   // The next/step/stepout/stepInstruction command terminated
 	StopCallReturned                   // An injected call completed
 	StopWatchpoint                     // The target process hit one or more watchpoints
 )
diff --git a/pkg/proc/target_exec.go b/pkg/proc/target_exec.go
index cdeeca4d..528000ee 100644
--- a/pkg/proc/target_exec.go
+++ b/pkg/proc/target_exec.go
@@ -457,6 +457,7 @@ func (dbp *Target) StepInstruction() (err error) {
 	if tg, _ := GetG(thread); tg != nil {
 		dbp.selectedGoroutine = tg
 	}
+	dbp.StopReason = StopNextFinished
 	return nil
 }
 
diff --git a/pkg/proc/variables.go b/pkg/proc/variables.go
index e8bc08d4..0f794da4 100644
--- a/pkg/proc/variables.go
+++ b/pkg/proc/variables.go
@@ -497,7 +497,7 @@ func (g *G) UserCurrent() Location {
 		frame := it.Frame()
 		if frame.Call.Fn != nil {
 			name := frame.Call.Fn.Name
-			if strings.Contains(name, ".") && (!strings.HasPrefix(name, "runtime.") || frame.Call.Fn.exportedRuntime()) {
+			if strings.Contains(name, ".") && (!strings.HasPrefix(name, "runtime.") || frame.Call.Fn.exportedRuntime()) && !strings.HasPrefix(name, "internal/") && !strings.HasPrefix(name, "runtime/internal") {
 				return frame.Call
 			}
 		}
diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go
index 5e37271a..09c03b1b 100644
--- a/pkg/terminal/command.go
+++ b/pkg/terminal/command.go
@@ -28,7 +28,6 @@ import (
 	"github.com/cosiner/argv"
 	"github.com/go-delve/delve/pkg/config"
 	"github.com/go-delve/delve/pkg/locspec"
-	"github.com/go-delve/delve/pkg/terminal/colorize"
 	"github.com/go-delve/delve/service"
 	"github.com/go-delve/delve/service/api"
 	"github.com/go-delve/delve/service/rpc2"
@@ -122,16 +121,16 @@ func DebugCommands(client service.Client) *Commands {
 Type "help" followed by the name of a command for more information about it.`},
 		{aliases: []string{"break", "b"}, group: breakCmds, cmdFn: breakpoint, helpMsg: `Sets a breakpoint.
 
-	break [name] <linespec>
+	break [name] [linespec]
 
-See $GOPATH/src/github.com/go-delve/delve/Documentation/cli/locspec.md for the syntax of linespec.
+See $GOPATH/src/github.com/go-delve/delve/Documentation/cli/locspec.md for the syntax of linespec. If linespec is omitted a breakpoint will be set on the current line.
 
 See also: "help on", "help cond" and "help clear"`},
 		{aliases: []string{"trace", "t"}, group: breakCmds, cmdFn: tracepoint, allowedPrefixes: onPrefix, helpMsg: `Set tracepoint.
 
-	trace [name] <linespec>
+	trace [name] [linespec]
 
-A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See $GOPATH/src/github.com/go-delve/delve/Documentation/cli/locspec.md for the syntax of linespec.
+A tracepoint is a breakpoint that does not stop the execution of the program, instead when the tracepoint is hit a notification is displayed. See $GOPATH/src/github.com/go-delve/delve/Documentation/cli/locspec.md for the syntax of linespec. If linespec is omitted a tracepoint will be set on the current line.
 
 See also: "help on", "help cond" and "help clear"`},
 		{aliases: []string{"watch"}, group: breakCmds, cmdFn: watchpoint, helpMsg: `Set watchpoint.
@@ -536,6 +535,15 @@ If display is called without arguments it will print the value of all expression
 	dump <output file>
 
 The core dump is always written in ELF, even on systems (windows, macOS) where this is not customary. For environments other than linux/amd64 threads and registers are dumped in a format that only Delve can read back.`},
+
+		{aliases: []string{"transcript"}, cmdFn: transcript, helpMsg: `Appends command output to a file.
+
+	transcript [-t] [-x] <output file>
+	transcript -off
+
+Output of Delve's command is appended to the specified output file. If '-t' is specified and the output file exists it is truncated. If '-x' is specified output to stdout is suppressed instead.
+
+Using the -off option disables the transcript.`},
 	}
 
 	addrecorded := client == nil
@@ -554,7 +562,7 @@ The core dump is always written in ELF, even on systems (windows, macOS) where t
 				aliases: []string{"rewind", "rw"},
 				group:   runCmds,
 				cmdFn:   c.rewind,
-				helpMsg: "Run backwards until breakpoint or program termination.",
+				helpMsg: "Run backwards until breakpoint or start of recorded history.",
 			},
 			command{
 				aliases: []string{"check", "checkpoint"},
@@ -674,7 +682,7 @@ func (c *Commands) help(t *Term, ctx callContext, args string) error {
 		for _, cmd := range c.cmds {
 			for _, alias := range cmd.aliases {
 				if alias == args {
-					fmt.Println(cmd.helpMsg)
+					fmt.Fprintln(t.stdout, cmd.helpMsg)
 					return nil
 				}
 			}
@@ -682,12 +690,12 @@ func (c *Commands) help(t *Term, ctx callContext, args string) error {
 		return errNoCmd
 	}
 
-	fmt.Println("The following commands are available:")
+	fmt.Fprintln(t.stdout, "The following commands are available:")
 
 	for _, cgd := range commandGroupDescriptions {
-		fmt.Printf("\n%s:\n", cgd.description)
+		fmt.Fprintf(t.stdout, "\n%s:\n", cgd.description)
 		w := new(tabwriter.Writer)
-		w.Init(os.Stdout, 0, 8, 0, '-', 0)
+		w.Init(t.stdout, 0, 8, 0, '-', 0)
 		for _, cmd := range c.cmds {
 			if cmd.group != cgd.group {
 				continue
@@ -707,8 +715,8 @@ func (c *Commands) help(t *Term, ctx callContext, args string) error {
 		}
 	}
 
-	fmt.Println()
-	fmt.Println("Type help followed by a command for full documentation.")
+	fmt.Fprintln(t.stdout)
+	fmt.Fprintln(t.stdout, "Type help followed by a command for full documentation.")
 	return nil
 }
 
@@ -734,11 +742,11 @@ func threads(t *Term, ctx callContext, args string) error {
 			prefix = "* "
 		}
 		if th.Function != nil {
-			fmt.Printf("%sThread %d at %#v %s:%d %s\n",
+			fmt.Fprintf(t.stdout, "%sThread %d at %#v %s:%d %s\n",
 				prefix, th.ID, th.PC, t.formatPath(th.File),
 				th.Line, th.Function.Name())
 		} else {
-			fmt.Printf("%sThread %s\n", prefix, t.formatThread(th))
+			fmt.Fprintf(t.stdout, "%sThread %s\n", prefix, t.formatThread(th))
 		}
 	}
 	return nil
@@ -769,7 +777,7 @@ func thread(t *Term, ctx callContext, args string) error {
 	if newState.CurrentThread != nil {
 		newThread = strconv.Itoa(newState.CurrentThread.ID)
 	}
-	fmt.Printf("Switched from %s to %s\n", oldThread, newThread)
+	fmt.Fprintf(t.stdout, "Switched from %s to %s\n", oldThread, newThread)
 	return nil
 }
 
@@ -785,16 +793,16 @@ func printGoroutines(t *Term, indent string, gs []*api.Goroutine, fgl api.Format
 		if state.SelectedGoroutine != nil && g.ID == state.SelectedGoroutine.ID {
 			prefix = indent + "* "
 		}
-		fmt.Printf("%sGoroutine %s\n", prefix, t.formatGoroutine(g, fgl))
+		fmt.Fprintf(t.stdout, "%sGoroutine %s\n", prefix, t.formatGoroutine(g, fgl))
 		if flags&api.PrintGoroutinesLabels != 0 {
-			writeGoroutineLabels(os.Stdout, g, indent+"\t")
+			writeGoroutineLabels(t.stdout, g, indent+"\t")
 		}
 		if flags&api.PrintGoroutinesStack != 0 {
 			stack, err := t.client.Stacktrace(g.ID, depth, 0, nil)
 			if err != nil {
 				return err
 			}
-			printStack(t, os.Stdout, stack, indent+"\t", false)
+			printStack(t, t.stdout, stack, indent+"\t", false)
 		}
 	}
 	return nil
@@ -820,7 +828,7 @@ func goroutines(t *Term, ctx callContext, argstr string) error {
 	t.longCommandStart()
 	for start >= 0 {
 		if t.longCommandCanceled() {
-			fmt.Printf("interrupted\n")
+			fmt.Fprintf(t.stdout, "interrupted\n")
 			return nil
 		}
 		gs, groups, start, tooManyGroups, err = t.client.ListGoroutinesWithFilter(start, batchSize, filters, &group)
@@ -829,18 +837,18 @@ func goroutines(t *Term, ctx callContext, argstr string) error {
 		}
 		if len(groups) > 0 {
 			for i := range groups {
-				fmt.Printf("%s\n", groups[i].Name)
+				fmt.Fprintf(t.stdout, "%s\n", groups[i].Name)
 				err = printGoroutines(t, "\t", gs[groups[i].Offset:][:groups[i].Count], fgl, flags, depth, state)
 				if err != nil {
 					return err
 				}
-				fmt.Printf("\tTotal: %d\n", groups[i].Total)
+				fmt.Fprintf(t.stdout, "\tTotal: %d\n", groups[i].Total)
 				if i != len(groups)-1 {
-					fmt.Printf("\n")
+					fmt.Fprintf(t.stdout, "\n")
 				}
 			}
 			if tooManyGroups {
-				fmt.Printf("Too many groups\n")
+				fmt.Fprintf(t.stdout, "Too many groups\n")
 			}
 		} else {
 			sort.Sort(byGoroutineID(gs))
@@ -852,7 +860,7 @@ func goroutines(t *Term, ctx callContext, argstr string) error {
 		}
 	}
 	if gslen > 0 {
-		fmt.Printf("[%d goroutines]\n", gslen)
+		fmt.Fprintf(t.stdout, "[%d goroutines]\n", gslen)
 	}
 	return nil
 }
@@ -893,7 +901,7 @@ func (c *Commands) goroutine(t *Term, ctx callContext, argstr string) error {
 			return err
 		}
 		c.frame = 0
-		fmt.Printf("Switched from %d to %d (thread %d)\n", selectedGID(oldState), gid, newState.CurrentThread.ID)
+		fmt.Fprintf(t.stdout, "Switched from %d to %d (thread %d)\n", selectedGID(oldState), gid, newState.CurrentThread.ID)
 		return nil
 	}
 
@@ -950,7 +958,7 @@ func (c *Commands) frameCommand(t *Term, ctx callContext, argstr string, directi
 	}
 	printcontext(t, state)
 	th := stack[frame]
-	fmt.Printf("Frame %d: %s:%d (PC: %x)\n", frame, t.formatPath(th.File), th.Line, th.PC)
+	fmt.Fprintf(t.stdout, "Frame %d: %s:%d (PC: %x)\n", frame, t.formatPath(th.File), th.Line, th.PC)
 	printfile(t, th.File, th.Line, true)
 	return nil
 }
@@ -980,9 +988,9 @@ func printscope(t *Term) error {
 		return err
 	}
 
-	fmt.Printf("Thread %s\n", t.formatThread(state.CurrentThread))
+	fmt.Fprintf(t.stdout, "Thread %s\n", t.formatThread(state.CurrentThread))
 	if state.SelectedGoroutine != nil {
-		writeGoroutineLong(t, os.Stdout, state.SelectedGoroutine, "")
+		writeGoroutineLong(t, t.stdout, state.SelectedGoroutine, "")
 	}
 	return nil
 }
@@ -1182,7 +1190,7 @@ func restartLive(t *Term, ctx callContext, args string) error {
 		return err
 	}
 
-	fmt.Println("Process restarted with PID", t.client.ProcessPid())
+	fmt.Fprintln(t.stdout, "Process restarted with PID", t.client.ProcessPid())
 	return nil
 }
 
@@ -1192,7 +1200,7 @@ func restartIntl(t *Term, rerecord bool, restartPos string, resetArgs bool, newA
 		return err
 	}
 	for i := range discarded {
-		fmt.Printf("Discarded %s at %s: %v\n", formatBreakpointName(discarded[i].Breakpoint, false), t.formatBreakpointLocation(discarded[i].Breakpoint), discarded[i].Reason)
+		fmt.Fprintf(t.stdout, "Discarded %s at %s: %v\n", formatBreakpointName(discarded[i].Breakpoint, false), t.formatBreakpointLocation(discarded[i].Breakpoint), discarded[i].Reason)
 	}
 	return nil
 }
@@ -1276,7 +1284,7 @@ func (c *Commands) rebuild(t *Term, ctx callContext, args string) error {
 	defer t.onStop()
 	discarded, err := t.client.Restart(true)
 	if len(discarded) > 0 {
-		fmt.Printf("not all breakpoints could be restored.")
+		fmt.Fprintf(t.stdout, "not all breakpoints could be restored.")
 	}
 	return err
 }
@@ -1292,7 +1300,7 @@ func (c *Commands) cont(t *Term, ctx callContext, args string) error {
 		defer func() {
 			for _, bp := range tmp {
 				if _, err := t.client.ClearBreakpoint(bp.ID); err != nil {
-					fmt.Printf("failed to clear temporary breakpoint: %d", bp.ID)
+					fmt.Fprintf(t.stdout, "failed to clear temporary breakpoint: %d", bp.ID)
 				}
 			}
 		}()
@@ -1325,16 +1333,16 @@ func continueUntilCompleteNext(t *Term, state *api.DebuggerState, op string, sho
 	}
 	skipBreakpoints := false
 	for {
-		fmt.Printf("\tbreakpoint hit during %s", op)
+		fmt.Fprintf(t.stdout, "\tbreakpoint hit during %s", op)
 		if !skipBreakpoints {
-			fmt.Printf("\n")
+			fmt.Fprintf(t.stdout, "\n")
 			answer, err := promptAutoContinue(t, op)
 			switch answer {
 			case "f": // finish next
 				skipBreakpoints = true
 				fallthrough
 			case "c": // continue once
-				fmt.Printf("continuing...\n")
+				fmt.Fprintf(t.stdout, "continuing...\n")
 			case "s": // stop and cancel
 				fallthrough
 			default:
@@ -1343,7 +1351,7 @@ func continueUntilCompleteNext(t *Term, state *api.DebuggerState, op string, sho
 				return err
 			}
 		} else {
-			fmt.Printf(", continuing...\n")
+			fmt.Fprintf(t.stdout, ", continuing...\n")
 		}
 		stateChan := t.client.DirectionCongruentContinue()
 		var state *api.DebuggerState
@@ -1542,7 +1550,7 @@ func clear(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	fmt.Printf("%s cleared at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
+	fmt.Fprintf(t.stdout, "%s cleared at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
 	return nil
 }
 
@@ -1580,9 +1588,9 @@ func clearAll(t *Term, ctx callContext, args string) error {
 
 		_, err := t.client.ClearBreakpoint(bp.ID)
 		if err != nil {
-			fmt.Printf("Couldn't delete %s at %s: %s\n", formatBreakpointName(bp, false), t.formatBreakpointLocation(bp), err)
+			fmt.Fprintf(t.stdout, "Couldn't delete %s at %s: %s\n", formatBreakpointName(bp, false), t.formatBreakpointLocation(bp), err)
 		}
-		fmt.Printf("%s cleared at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
+		fmt.Fprintf(t.stdout, "%s cleared at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
 	}
 	return nil
 }
@@ -1601,7 +1609,7 @@ func toggle(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	fmt.Printf("%s toggled at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
+	fmt.Fprintf(t.stdout, "%s toggled at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
 	return nil
 }
 
@@ -1623,12 +1631,12 @@ func breakpoints(t *Term, ctx callContext, args string) error {
 		if bp.Disabled {
 			enabled = "(disabled)"
 		}
-		fmt.Printf("%s %s at %v (%d)\n", formatBreakpointName(bp, true), enabled, t.formatBreakpointLocation(bp), bp.TotalHitCount)
+		fmt.Fprintf(t.stdout, "%s %s at %v (%d)\n", formatBreakpointName(bp, true), enabled, t.formatBreakpointLocation(bp), bp.TotalHitCount)
 
 		attrs := formatBreakpointAttrs("\t", bp, false)
 
 		if len(attrs) > 0 {
-			fmt.Printf("%s\n", strings.Join(attrs, "\n"))
+			fmt.Fprintf(t.stdout, "%s\n", strings.Join(attrs, "\n"))
 		}
 	}
 	return nil
@@ -1681,7 +1689,12 @@ func setBreakpoint(t *Term, ctx callContext, tracepoint bool, argstr string) ([]
 	spec := ""
 	switch len(args) {
 	case 1:
-		spec = argstr
+		if len(args[0]) != 0 {
+			spec = argstr
+		} else {
+			// no arg specified
+			spec = "+0"
+		}
 	case 2:
 		if api.ValidBreakpointName(args[0]) == nil {
 			requestedBp.Name = args[0]
@@ -1721,7 +1734,7 @@ func setBreakpoint(t *Term, ctx callContext, tracepoint bool, argstr string) ([]
 		}
 		created = append(created, bp)
 
-		fmt.Printf("%s set at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
+		fmt.Fprintf(t.stdout, "%s set at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
 	}
 
 	var shouldSetReturnBreakpoints bool
@@ -1820,7 +1833,7 @@ func watchpoint(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	fmt.Printf("%s set at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
+	fmt.Fprintf(t.stdout, "%s set at %s\n", formatBreakpointName(bp, true), t.formatBreakpointLocation(bp))
 	return nil
 }
 
@@ -1950,7 +1963,7 @@ loop:
 	if err != nil {
 		return err
 	}
-	fmt.Print(api.PrettyExamineMemory(uintptr(address), memArea, isLittleEndian, priFmt, size))
+	fmt.Fprint(t.stdout, api.PrettyExamineMemory(uintptr(address), memArea, isLittleEndian, priFmt, size))
 	return nil
 }
 
@@ -1979,7 +1992,7 @@ func printVar(t *Term, ctx callContext, args string) error {
 		return err
 	}
 
-	fmt.Println(val.MultilineString("", fmtstr))
+	fmt.Fprintln(t.stdout, val.MultilineString("", fmtstr))
 	return nil
 }
 
@@ -1992,20 +2005,20 @@ func whatisCommand(t *Term, ctx callContext, args string) error {
 		return err
 	}
 	if val.Flags&api.VariableCPURegister != 0 {
-		fmt.Println("CPU Register")
+		fmt.Fprintln(t.stdout, "CPU Register")
 		return nil
 	}
 	if val.Type != "" {
-		fmt.Println(val.Type)
+		fmt.Fprintln(t.stdout, val.Type)
 	}
 	if val.RealType != val.Type {
-		fmt.Printf("Real type: %s\n", val.RealType)
+		fmt.Fprintf(t.stdout, "Real type: %s\n", val.RealType)
 	}
 	if val.Kind == reflect.Interface && len(val.Children) > 0 {
-		fmt.Printf("Concrete type: %s\n", val.Children[0].Type)
+		fmt.Fprintf(t.stdout, "Concrete type: %s\n", val.Children[0].Type)
 	}
 	if t.conf.ShowLocationExpr && val.LocationExpr != "" {
-		fmt.Printf("location: %s\n", val.LocationExpr)
+		fmt.Fprintf(t.stdout, "location: %s\n", val.LocationExpr)
 	}
 	return nil
 }
@@ -2027,7 +2040,7 @@ func setVar(t *Term, ctx callContext, args string) error {
 	return t.client.SetVariable(ctx.Scope, lexpr, rexpr)
 }
 
-func printFilteredVariables(varType string, vars []api.Variable, filter string, cfg api.LoadConfig) error {
+func (t *Term) printFilteredVariables(varType string, vars []api.Variable, filter string, cfg api.LoadConfig) error {
 	reg, err := regexp.Compile(filter)
 	if err != nil {
 		return err
@@ -2041,39 +2054,39 @@ func printFilteredVariables(varType string, vars []api.Variable, filter string,
 				name = "(" + name + ")"
 			}
 			if cfg == ShortLoadConfig {
-				fmt.Printf("%s = %s\n", name, v.SinglelineString())
+				fmt.Fprintf(t.stdout, "%s = %s\n", name, v.SinglelineString())
 			} else {
-				fmt.Printf("%s = %s\n", name, v.MultilineString("", ""))
+				fmt.Fprintf(t.stdout, "%s = %s\n", name, v.MultilineString("", ""))
 			}
 		}
 	}
 	if !match {
-		fmt.Printf("(no %s)\n", varType)
+		fmt.Fprintf(t.stdout, "(no %s)\n", varType)
 	}
 	return nil
 }
 
-func printSortedStrings(v []string, err error) error {
+func (t *Term) printSortedStrings(v []string, err error) error {
 	if err != nil {
 		return err
 	}
 	sort.Strings(v)
 	for _, d := range v {
-		fmt.Println(d)
+		fmt.Fprintln(t.stdout, d)
 	}
 	return nil
 }
 
 func sources(t *Term, ctx callContext, args string) error {
-	return printSortedStrings(t.client.ListSources(args))
+	return t.printSortedStrings(t.client.ListSources(args))
 }
 
 func funcs(t *Term, ctx callContext, args string) error {
-	return printSortedStrings(t.client.ListFunctions(args))
+	return t.printSortedStrings(t.client.ListFunctions(args))
 }
 
 func types(t *Term, ctx callContext, args string) error {
-	return printSortedStrings(t.client.ListTypes(args))
+	return t.printSortedStrings(t.client.ListTypes(args))
 }
 
 func parseVarArguments(args string, t *Term) (filter string, cfg api.LoadConfig) {
@@ -2100,7 +2113,7 @@ func args(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	return printFilteredVariables("args", vars, filter, cfg)
+	return t.printFilteredVariables("args", vars, filter, cfg)
 }
 
 func locals(t *Term, ctx callContext, args string) error {
@@ -2116,7 +2129,7 @@ func locals(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	return printFilteredVariables("locals", locals, filter, cfg)
+	return t.printFilteredVariables("locals", locals, filter, cfg)
 }
 
 func vars(t *Term, ctx callContext, args string) error {
@@ -2125,7 +2138,7 @@ func vars(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	return printFilteredVariables("vars", vars, filter, cfg)
+	return t.printFilteredVariables("vars", vars, filter, cfg)
 }
 
 func regs(t *Term, ctx callContext, args string) error {
@@ -2143,7 +2156,7 @@ func regs(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	fmt.Println(regs)
+	fmt.Fprintln(t.stdout, regs)
 	return nil
 }
 
@@ -2164,19 +2177,19 @@ func stackCommand(t *Term, ctx callContext, args string) error {
 	if err != nil {
 		return err
 	}
-	printStack(t, os.Stdout, stack, "", sa.offsets)
+	printStack(t, t.stdout, stack, "", sa.offsets)
 	if sa.ancestors > 0 {
 		ancestors, err := t.client.Ancestors(ctx.Scope.GoroutineID, sa.ancestors, sa.ancestorDepth)
 		if err != nil {
 			return err
 		}
 		for _, ancestor := range ancestors {
-			fmt.Printf("Created by Goroutine %d:\n", ancestor.ID)
+			fmt.Fprintf(t.stdout, "Created by Goroutine %d:\n", ancestor.ID)
 			if ancestor.Unreadable != "" {
-				fmt.Printf("\t%s\n", ancestor.Unreadable)
+				fmt.Fprintf(t.stdout, "\t%s\n", ancestor.Unreadable)
 				continue
 			}
-			printStack(t, os.Stdout, ancestor.Stack, "\t", false)
+			printStack(t, t.stdout, ancestor.Stack, "\t", false)
 		}
 	}
 	return nil
@@ -2300,7 +2313,7 @@ func getLocation(t *Term, ctx callContext, args string, showContext bool) (file
 			}
 		}
 		if showContext {
-			fmt.Printf("Goroutine %d frame %d at %s:%d (PC: %#x)\n", gid, ctx.Scope.Frame, loc.File, loc.Line, loc.PC)
+			fmt.Fprintf(t.stdout, "Goroutine %d frame %d at %s:%d (PC: %#x)\n", gid, ctx.Scope.Frame, loc.File, loc.Line, loc.PC)
 		}
 		return loc.File, loc.Line, true, nil
 
@@ -2314,7 +2327,7 @@ func getLocation(t *Term, ctx callContext, args string, showContext bool) (file
 		}
 		loc := locs[0]
 		if showContext {
-			fmt.Printf("Showing %s:%d (PC: %#x)\n", loc.File, loc.Line, loc.PC)
+			fmt.Fprintf(t.stdout, "Showing %s:%d (PC: %#x)\n", loc.File, loc.Line, loc.PC)
 		}
 		return loc.File, loc.Line, false, nil
 	}
@@ -2412,7 +2425,7 @@ func disassCommand(t *Term, ctx callContext, args string) error {
 		return disasmErr
 	}
 
-	disasmPrint(disasm, os.Stdout)
+	disasmPrint(disasm, t.stdout)
 
 	return nil
 }
@@ -2424,7 +2437,7 @@ func libraries(t *Term, ctx callContext, args string) error {
 	}
 	d := digits(len(libs))
 	for i := range libs {
-		fmt.Printf("%"+strconv.Itoa(d)+"d. %#x %s\n", i, libs[i].Address, libs[i].Path)
+		fmt.Fprintf(t.stdout, "%"+strconv.Itoa(d)+"d. %#x %s\n", i, libs[i].Address, libs[i].Path)
 	}
 	return nil
 }
@@ -2451,7 +2464,7 @@ func printcontext(t *Term, state *api.DebuggerState) {
 	}
 
 	if state.CurrentThread == nil {
-		fmt.Println("No current thread available")
+		fmt.Fprintln(t.stdout, "No current thread available")
 		return
 	}
 
@@ -2472,38 +2485,38 @@ func printcontext(t *Term, state *api.DebuggerState) {
 	}
 
 	if th.File == "" {
-		fmt.Printf("Stopped at: 0x%x\n", state.CurrentThread.PC)
-		_ = colorize.Print(t.stdout, "", bytes.NewReader([]byte("no source available")), 1, 10, 1, nil)
+		fmt.Fprintf(t.stdout, "Stopped at: 0x%x\n", state.CurrentThread.PC)
+		t.stdout.ColorizePrint("", bytes.NewReader([]byte("no source available")), 1, 10, 1)
 		return
 	}
 
 	printcontextThread(t, th)
 
 	if state.When != "" {
-		fmt.Println(state.When)
+		fmt.Fprintln(t.stdout, state.When)
 	}
 
 	for _, watchpoint := range state.WatchOutOfScope {
-		fmt.Printf("%s went out of scope and was cleared\n", formatBreakpointName(watchpoint, true))
+		fmt.Fprintf(t.stdout, "%s went out of scope and was cleared\n", formatBreakpointName(watchpoint, true))
 	}
 }
 
 func printcontextLocation(t *Term, loc api.Location) {
-	fmt.Printf("> %s() %s:%d (PC: %#v)\n", loc.Function.Name(), t.formatPath(loc.File), loc.Line, loc.PC)
+	fmt.Fprintf(t.stdout, "> %s() %s:%d (PC: %#v)\n", loc.Function.Name(), t.formatPath(loc.File), loc.Line, loc.PC)
 	if loc.Function != nil && loc.Function.Optimized {
-		fmt.Println(optimizedFunctionWarning)
+		fmt.Fprintln(t.stdout, optimizedFunctionWarning)
 	}
 }
 
-func printReturnValues(th *api.Thread) {
+func printReturnValues(t *Term, th *api.Thread) {
 	if th.ReturnValues == nil {
 		return
 	}
-	fmt.Println("Values returned:")
+	fmt.Fprintln(t.stdout, "Values returned:")
 	for _, v := range th.ReturnValues {
-		fmt.Printf("\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
+		fmt.Fprintf(t.stdout, "\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
 	}
-	fmt.Println()
+	fmt.Fprintln(t.stdout)
 }
 
 func printcontextThread(t *Term, th *api.Thread) {
@@ -2511,7 +2524,7 @@ func printcontextThread(t *Term, th *api.Thread) {
 
 	if th.Breakpoint == nil {
 		printcontextLocation(t, api.Location{PC: th.PC, File: th.File, Line: th.Line, Function: th.Function})
-		printReturnValues(th)
+		printReturnValues(t, th)
 		return
 	}
 
@@ -2548,7 +2561,7 @@ func printcontextThread(t *Term, th *api.Thread) {
 	}
 
 	if hitCount, ok := th.Breakpoint.HitCount[strconv.Itoa(th.GoroutineID)]; ok {
-		fmt.Printf("> %s%s(%s) %s:%d (hits goroutine(%d):%d total:%d) (PC: %#v)\n",
+		fmt.Fprintf(t.stdout, "> %s%s(%s) %s:%d (hits goroutine(%d):%d total:%d) (PC: %#v)\n",
 			bpname,
 			fn.Name(),
 			args,
@@ -2559,7 +2572,7 @@ func printcontextThread(t *Term, th *api.Thread) {
 			th.Breakpoint.TotalHitCount,
 			th.PC)
 	} else {
-		fmt.Printf("> %s%s(%s) %s:%d (hits total:%d) (PC: %#v)\n",
+		fmt.Fprintf(t.stdout, "> %s%s(%s) %s:%d (hits total:%d) (PC: %#v)\n",
 			bpname,
 			fn.Name(),
 			args,
@@ -2569,10 +2582,10 @@ func printcontextThread(t *Term, th *api.Thread) {
 			th.PC)
 	}
 	if th.Function != nil && th.Function.Optimized {
-		fmt.Println(optimizedFunctionWarning)
+		fmt.Fprintln(t.stdout, optimizedFunctionWarning)
 	}
 
-	printReturnValues(th)
+	printReturnValues(t, th)
 	printBreakpointInfo(t, th, false)
 }
 
@@ -2593,47 +2606,47 @@ func printBreakpointInfo(t *Term, th *api.Thread, tracepointOnNewline bool) {
 			return
 		}
 		didprintnl = true
-		fmt.Println()
+		fmt.Fprintln(t.stdout)
 	}
 
 	if bpi.Goroutine != nil {
 		tracepointnl()
-		writeGoroutineLong(t, os.Stdout, bpi.Goroutine, "\t")
+		writeGoroutineLong(t, t.stdout, bpi.Goroutine, "\t")
 	}
 
 	for _, v := range bpi.Variables {
 		tracepointnl()
-		fmt.Printf("\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
+		fmt.Fprintf(t.stdout, "\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
 	}
 
 	for _, v := range bpi.Locals {
 		tracepointnl()
 		if *bp.LoadLocals == longLoadConfig {
-			fmt.Printf("\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
+			fmt.Fprintf(t.stdout, "\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
 		} else {
-			fmt.Printf("\t%s: %s\n", v.Name, v.SinglelineString())
+			fmt.Fprintf(t.stdout, "\t%s: %s\n", v.Name, v.SinglelineString())
 		}
 	}
 
 	if bp.LoadArgs != nil && *bp.LoadArgs == longLoadConfig {
 		for _, v := range bpi.Arguments {
 			tracepointnl()
-			fmt.Printf("\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
+			fmt.Fprintf(t.stdout, "\t%s: %s\n", v.Name, v.MultilineString("\t", ""))
 		}
 	}
 
 	if bpi.Stacktrace != nil {
 		tracepointnl()
-		fmt.Printf("\tStack:\n")
-		printStack(t, os.Stdout, bpi.Stacktrace, "\t\t", false)
+		fmt.Fprintf(t.stdout, "\tStack:\n")
+		printStack(t, t.stdout, bpi.Stacktrace, "\t\t", false)
 	}
 }
 
 func printTracepoint(t *Term, th *api.Thread, bpname string, fn *api.Function, args string, hasReturnValue bool) {
 	if th.Breakpoint.Tracepoint {
-		fmt.Fprintf(os.Stderr, "> goroutine(%d): %s%s(%s)", th.GoroutineID, bpname, fn.Name(), args)
+		fmt.Fprintf(t.stdout, "> goroutine(%d): %s%s(%s)", th.GoroutineID, bpname, fn.Name(), args)
 		if !hasReturnValue {
-			fmt.Println()
+			fmt.Fprintln(t.stdout)
 		}
 		printBreakpointInfo(t, th, !hasReturnValue)
 	}
@@ -2642,12 +2655,12 @@ func printTracepoint(t *Term, th *api.Thread, bpname string, fn *api.Function, a
 		for _, v := range th.ReturnValues {
 			retVals = append(retVals, v.SinglelineString())
 		}
-		fmt.Fprintf(os.Stderr, " => (%s)\n", strings.Join(retVals, ","))
+		fmt.Fprintf(t.stdout, " => (%s)\n", strings.Join(retVals, ","))
 	}
 	if th.Breakpoint.TraceReturn || !hasReturnValue {
 		if th.BreakpointInfo != nil && th.BreakpointInfo.Stacktrace != nil {
-			fmt.Fprintf(os.Stderr, "\tStack:\n")
-			printStack(t, os.Stderr, th.BreakpointInfo.Stacktrace, "\t\t", false)
+			fmt.Fprintf(t.stdout, "\tStack:\n")
+			printStack(t, t.stdout, th.BreakpointInfo.Stacktrace, "\t\t", false)
 		}
 	}
 }
@@ -2672,10 +2685,10 @@ func printfile(t *Term, filename string, line int, showArrow bool) error {
 	fi, _ := file.Stat()
 	lastModExe := t.client.LastModified()
 	if fi.ModTime().After(lastModExe) {
-		fmt.Println("Warning: listing may not match stale executable")
+		fmt.Fprintln(t.stdout, "Warning: listing may not match stale executable")
 	}
 
-	return colorize.Print(t.stdout, file.Name(), file, line-lineCount, line+lineCount+1, arrowLine, t.colorEscapes)
+	return t.stdout.ColorizePrint(file.Name(), file, line-lineCount, line+lineCount+1, arrowLine)
 }
 
 // ExitRequestError is returned when the user
@@ -2774,7 +2787,7 @@ func (c *Commands) parseBreakpointAttrs(t *Term, ctx callContext, r io.Reader) e
 		lineno++
 		err := c.CallWithContext(scan.Text(), t, ctx)
 		if err != nil {
-			fmt.Printf("%d: %s\n", lineno, err.Error())
+			fmt.Fprintf(t.stdout, "%d: %s\n", lineno, err.Error())
 		}
 	}
 	return scan.Err()
@@ -2845,7 +2858,7 @@ func (c *Commands) executeFile(t *Term, name string) error {
 			if _, isExitRequest := err.(ExitRequestError); isExitRequest {
 				return err
 			}
-			fmt.Printf("%s:%d: %v\n", name, lineno, err)
+			fmt.Fprintf(t.stdout, "%s:%d: %v\n", name, lineno, err)
 		}
 	}
 
@@ -2884,7 +2897,7 @@ func checkpoint(t *Term, ctx callContext, args string) error {
 		return err
 	}
 
-	fmt.Printf("Checkpoint c%d created.\n", cpid)
+	fmt.Fprintf(t.stdout, "Checkpoint c%d created.\n", cpid)
 	return nil
 }
 
@@ -2894,7 +2907,7 @@ func checkpoints(t *Term, ctx callContext, args string) error {
 		return err
 	}
 	w := new(tabwriter.Writer)
-	w.Init(os.Stdout, 4, 4, 2, ' ', 0)
+	w.Init(t.stdout, 4, 4, 2, ' ', 0)
 	fmt.Fprintln(w, "ID\tWhen\tNote")
 	for _, cp := range cps {
 		fmt.Fprintf(w, "c%d\t%s\t%s\n", cp.ID, cp.When, cp.Where)
@@ -2959,26 +2972,77 @@ func dump(t *Term, ctx callContext, args string) error {
 	}
 	for {
 		if dumpState.ThreadsDone != dumpState.ThreadsTotal {
-			fmt.Printf("\rDumping threads %d / %d...", dumpState.ThreadsDone, dumpState.ThreadsTotal)
+			fmt.Fprintf(t.stdout, "\rDumping threads %d / %d...", dumpState.ThreadsDone, dumpState.ThreadsTotal)
 		} else {
-			fmt.Printf("\rDumping memory %d / %d...", dumpState.MemDone, dumpState.MemTotal)
+			fmt.Fprintf(t.stdout, "\rDumping memory %d / %d...", dumpState.MemDone, dumpState.MemTotal)
 		}
 		if !dumpState.Dumping {
 			break
 		}
 		dumpState = t.client.CoreDumpWait(1000)
 	}
-	fmt.Printf("\n")
+	fmt.Fprintf(t.stdout, "\n")
 	if dumpState.Err != "" {
-		fmt.Printf("error dumping: %s\n", dumpState.Err)
+		fmt.Fprintf(t.stdout, "error dumping: %s\n", dumpState.Err)
 	} else if !dumpState.AllDone {
-		fmt.Printf("canceled\n")
+		fmt.Fprintf(t.stdout, "canceled\n")
 	} else if dumpState.MemDone != dumpState.MemTotal {
-		fmt.Printf("Core dump could be incomplete\n")
+		fmt.Fprintf(t.stdout, "Core dump could be incomplete\n")
 	}
 	return nil
 }
 
+func transcript(t *Term, ctx callContext, args string) error {
+	argv := strings.SplitN(args, " ", -1)
+	truncate := false
+	fileOnly := false
+	disable := false
+	path := ""
+	for _, arg := range argv {
+		switch arg {
+		case "-x":
+			fileOnly = true
+		case "-t":
+			truncate = true
+		case "-off":
+			disable = true
+		default:
+			if path != "" || strings.HasPrefix(arg, "-") {
+				return fmt.Errorf("unrecognized option %q", arg)
+			} else {
+				path = arg
+			}
+		}
+	}
+
+	if disable {
+		if path != "" {
+			return errors.New("-o option specified with an output path")
+		}
+		return t.stdout.CloseTranscript()
+	}
+
+	if path == "" {
+		return errors.New("no output path specified")
+	}
+
+	flags := os.O_APPEND | os.O_WRONLY | os.O_CREATE
+	if truncate {
+		flags |= os.O_TRUNC
+	}
+	fh, err := os.OpenFile(path, flags, 0660)
+	if err != nil {
+		return err
+	}
+
+	if err := t.stdout.CloseTranscript(); err != nil {
+		return err
+	}
+
+	t.stdout.TranscribeTo(fh, fileOnly)
+	return nil
+}
+
 func formatBreakpointName(bp *api.Breakpoint, upcase bool) string {
 	thing := "breakpoint"
 	if bp.Tracepoint {
diff --git a/pkg/terminal/starbind/repl.go b/pkg/terminal/starbind/repl.go
index 1ecede4e..00bfccfe 100644
--- a/pkg/terminal/starbind/repl.go
+++ b/pkg/terminal/starbind/repl.go
@@ -58,14 +58,14 @@ func (env *Env) REPL() error {
 		if err := isCancelled(thread); err != nil {
 			return err
 		}
-		if err := rep(rl, thread, globals); err != nil {
+		if err := rep(rl, thread, globals, env.out); err != nil {
 			if err == io.EOF {
 				break
 			}
 			return err
 		}
 	}
-	fmt.Println()
+	fmt.Fprintln(env.out)
 	return env.exportGlobals(globals)
 }
 
@@ -80,12 +80,14 @@ const (
 //
 // It returns an error (possibly readline.ErrInterrupt)
 // only if readline failed. Starlark errors are printed.
-func rep(rl *liner.State, thread *starlark.Thread, globals starlark.StringDict) error {
+func rep(rl *liner.State, thread *starlark.Thread, globals starlark.StringDict, out EchoWriter) error {
+	defer out.Flush()
 	eof := false
 
 	prompt := normalPrompt
 	readline := func() ([]byte, error) {
 		line, err := rl.Prompt(prompt)
+		out.Echo(prompt + line)
 		if line == exitCommand {
 			eof = true
 			return nil, io.EOF
@@ -122,7 +124,7 @@ func rep(rl *liner.State, thread *starlark.Thread, globals starlark.StringDict)
 
 		// print
 		if v != starlark.None {
-			fmt.Println(v)
+			fmt.Fprintln(out, v)
 		}
 	} else {
 		// compile
diff --git a/pkg/terminal/starbind/starlark.go b/pkg/terminal/starbind/starlark.go
index f37e01a7..de37879e 100644
--- a/pkg/terminal/starbind/starlark.go
+++ b/pkg/terminal/starbind/starlark.go
@@ -3,6 +3,7 @@ package starbind
 import (
 	"context"
 	"fmt"
+	"io"
 	"io/ioutil"
 	"runtime"
 	"strings"
@@ -56,13 +57,15 @@ type Env struct {
 	cancelfn  context.CancelFunc
 
 	ctx Context
+	out EchoWriter
 }
 
 // New creates a new starlark binding environment.
-func New(ctx Context) *Env {
+func New(ctx Context, out EchoWriter) *Env {
 	env := &Env{}
 
 	env.ctx = ctx
+	env.out = out
 
 	env.env = env.starlarkPredeclare()
 	env.env[dlvCommandBuiltinName] = starlark.NewBuiltin(dlvCommandBuiltinName, func(thread *starlark.Thread, _ *starlark.Builtin, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
@@ -117,6 +120,18 @@ func New(ctx Context) *Env {
 	return env
 }
 
+// Redirect redirects starlark output to out.
+func (env *Env) Redirect(out EchoWriter) {
+	env.out = out
+	if env.thread != nil {
+		env.thread.Print = env.printFunc()
+	}
+}
+
+func (env *Env) printFunc() func(_ *starlark.Thread, msg string) {
+	return func(_ *starlark.Thread, msg string) { fmt.Fprintln(env.out, msg) }
+}
+
 // Execute executes a script. Path is the name of the file to execute and
 // source is the source code to execute.
 // Source can be either a []byte, a string or a io.Reader. If source is nil
@@ -128,7 +143,7 @@ func (env *Env) Execute(path string, source interface{}, mainFnName string, args
 		if err == nil {
 			return
 		}
-		fmt.Printf("panic executing starlark script: %v\n", err)
+		fmt.Fprintf(env.out, "panic executing starlark script: %v\n", err)
 		for i := 0; ; i++ {
 			pc, file, line, ok := runtime.Caller(i)
 			if !ok {
@@ -139,7 +154,7 @@ func (env *Env) Execute(path string, source interface{}, mainFnName string, args
 			if fn != nil {
 				fname = fn.Name()
 			}
-			fmt.Printf("%s\n\tin %s:%d\n", fname, file, line)
+			fmt.Fprintf(env.out, "%s\n\tin %s:%d\n", fname, file, line)
 		}
 	}()
 
@@ -193,7 +208,7 @@ func (env *Env) Cancel() {
 
 func (env *Env) newThread() *starlark.Thread {
 	thread := &starlark.Thread{
-		Print: func(_ *starlark.Thread, msg string) { fmt.Println(msg) },
+		Print: env.printFunc(),
 	}
 	env.contextMu.Lock()
 	var ctx context.Context
@@ -287,3 +302,9 @@ func decorateError(thread *starlark.Thread, err error) error {
 	}
 	return fmt.Errorf("%s:%d: %v", pos.Filename(), pos.Line, err)
 }
+
+type EchoWriter interface {
+	io.Writer
+	Echo(string)
+	Flush()
+}
diff --git a/pkg/terminal/terminal.go b/pkg/terminal/terminal.go
index 39a0b679..33f885c8 100644
--- a/pkg/terminal/terminal.go
+++ b/pkg/terminal/terminal.go
@@ -3,6 +3,7 @@ package terminal
 //lint:file-ignore ST1005 errors here can be capitalized
 
 import (
+	"bufio"
 	"fmt"
 	"io"
 	"net/rpc"
@@ -50,15 +51,14 @@ const (
 
 // Term represents the terminal running dlv.
 type Term struct {
-	client       service.Client
-	conf         *config.Config
-	prompt       string
-	line         *liner.State
-	cmds         *Commands
-	stdout       io.Writer
-	InitFile     string
-	displays     []displayEntry
-	colorEscapes map[colorize.Style]string
+	client   service.Client
+	conf     *config.Config
+	prompt   string
+	line     *liner.State
+	cmds     *Commands
+	stdout   *transcriptWriter
+	InitFile string
+	displays []displayEntry
 
 	historyFile *os.File
 
@@ -99,34 +99,34 @@ func New(client service.Client, conf *config.Config) *Term {
 		prompt: "(dlv) ",
 		line:   liner.NewLiner(),
 		cmds:   cmds,
-		stdout: os.Stdout,
+		stdout: &transcriptWriter{w: os.Stdout},
 	}
 
 	if strings.ToLower(os.Getenv("TERM")) != "dumb" {
-		t.stdout = getColorableWriter()
-		t.colorEscapes = make(map[colorize.Style]string)
-		t.colorEscapes[colorize.NormalStyle] = terminalResetEscapeCode
+		t.stdout.w = getColorableWriter()
+		t.stdout.colorEscapes = make(map[colorize.Style]string)
+		t.stdout.colorEscapes[colorize.NormalStyle] = terminalResetEscapeCode
 		wd := func(s string, defaultCode int) string {
 			if s == "" {
 				return fmt.Sprintf(terminalHighlightEscapeCode, defaultCode)
 			}
 			return s
 		}
-		t.colorEscapes[colorize.KeywordStyle] = conf.SourceListKeywordColor
-		t.colorEscapes[colorize.StringStyle] = wd(conf.SourceListStringColor, ansiGreen)
-		t.colorEscapes[colorize.NumberStyle] = conf.SourceListNumberColor
-		t.colorEscapes[colorize.CommentStyle] = wd(conf.SourceListCommentColor, ansiBrMagenta)
-		t.colorEscapes[colorize.ArrowStyle] = wd(conf.SourceListArrowColor, ansiYellow)
+		t.stdout.colorEscapes[colorize.KeywordStyle] = conf.SourceListKeywordColor
+		t.stdout.colorEscapes[colorize.StringStyle] = wd(conf.SourceListStringColor, ansiGreen)
+		t.stdout.colorEscapes[colorize.NumberStyle] = conf.SourceListNumberColor
+		t.stdout.colorEscapes[colorize.CommentStyle] = wd(conf.SourceListCommentColor, ansiBrMagenta)
+		t.stdout.colorEscapes[colorize.ArrowStyle] = wd(conf.SourceListArrowColor, ansiYellow)
 		switch x := conf.SourceListLineColor.(type) {
 		case string:
-			t.colorEscapes[colorize.LineNoStyle] = x
+			t.stdout.colorEscapes[colorize.LineNoStyle] = x
 		case int:
 			if (x > ansiWhite && x < ansiBrBlack) || x < ansiBlack || x > ansiBrWhite {
 				x = ansiBlue
 			}
-			t.colorEscapes[colorize.LineNoStyle] = fmt.Sprintf(terminalHighlightEscapeCode, x)
+			t.stdout.colorEscapes[colorize.LineNoStyle] = fmt.Sprintf(terminalHighlightEscapeCode, x)
 		case nil:
-			t.colorEscapes[colorize.LineNoStyle] = fmt.Sprintf(terminalHighlightEscapeCode, ansiBlue)
+			t.stdout.colorEscapes[colorize.LineNoStyle] = fmt.Sprintf(terminalHighlightEscapeCode, ansiBlue)
 		}
 	}
 
@@ -135,13 +135,16 @@ func New(client service.Client, conf *config.Config) *Term {
 		client.SetReturnValuesLoadConfig(&lcfg)
 	}
 
-	t.starlarkEnv = starbind.New(starlarkContext{t})
+	t.starlarkEnv = starbind.New(starlarkContext{t}, t.stdout)
 	return t
 }
 
 // Close returns the terminal to its previous mode.
 func (t *Term) Close() {
 	t.line.Close()
+	if err := t.stdout.CloseTranscript(); err != nil {
+		fmt.Fprintf(os.Stderr, "error closing transcript file: %v\n", err)
+	}
 }
 
 func (t *Term) sigintGuard(ch <-chan os.Signal, multiClient bool) {
@@ -150,7 +153,7 @@ func (t *Term) sigintGuard(ch <-chan os.Signal, multiClient bool) {
 		t.starlarkEnv.Cancel()
 		state, err := t.client.GetStateNonBlocking()
 		if err == nil && state.Recording {
-			fmt.Printf("received SIGINT, stopping recording (will not forward signal)\n")
+			fmt.Fprintf(t.stdout, "received SIGINT, stopping recording (will not forward signal)\n")
 			err := t.client.StopRecording()
 			if err != nil {
 				fmt.Fprintf(os.Stderr, "%v\n", err)
@@ -158,7 +161,7 @@ func (t *Term) sigintGuard(ch <-chan os.Signal, multiClient bool) {
 			continue
 		}
 		if err == nil && state.CoreDumping {
-			fmt.Printf("received SIGINT, stopping dump\n")
+			fmt.Fprintf(t.stdout, "received SIGINT, stopping dump\n")
 			err := t.client.CoreDumpCancel()
 			if err != nil {
 				fmt.Fprintf(os.Stderr, "%v\n", err)
@@ -189,14 +192,14 @@ func (t *Term) sigintGuard(ch <-chan os.Signal, multiClient bool) {
 					t.Close()
 				}
 			default:
-				fmt.Println("only p or q allowed")
+				fmt.Fprintln(t.stdout, "only p or q allowed")
 			}
 
 		} else {
-			fmt.Printf("received SIGINT, stopping process (will not forward signal)\n")
+			fmt.Fprintf(t.stdout, "received SIGINT, stopping process (will not forward signal)\n")
 			_, err := t.client.Halt()
 			if err != nil {
-				fmt.Fprintf(os.Stderr, "%v", err)
+				fmt.Fprintf(t.stdout, "%v", err)
 			}
 		}
 	}
@@ -278,11 +281,12 @@ func (t *Term) Run() (int, error) {
 		cmdstr, err := t.promptForInput()
 		if err != nil {
 			if err == io.EOF {
-				fmt.Println("exit")
+				fmt.Fprintln(t.stdout, "exit")
 				return t.handleExit()
 			}
 			return 1, fmt.Errorf("Prompt for input failed.\n")
 		}
+		t.stdout.Echo(t.prompt + cmdstr + "\n")
 
 		if strings.TrimSpace(cmdstr) == "" {
 			cmdstr = lastCmd
@@ -309,6 +313,8 @@ func (t *Term) Run() (int, error) {
 				fmt.Fprintf(os.Stderr, "Command failed: %s\n", err)
 			}
 		}
+
+		t.stdout.Flush()
 	}
 }
 
@@ -497,10 +503,10 @@ func (t *Term) printDisplay(i int) {
 		if isErrProcessExited(err) {
 			return
 		}
-		fmt.Printf("%d: %s = error %v\n", i, expr, err)
+		fmt.Fprintf(t.stdout, "%d: %s = error %v\n", i, expr, err)
 		return
 	}
-	fmt.Printf("%d: %s = %s\n", i, val.Name, val.SinglelineStringFormatted(fmtstr))
+	fmt.Fprintf(t.stdout, "%d: %s = %s\n", i, val.Name, val.SinglelineStringFormatted(fmtstr))
 }
 
 func (t *Term) printDisplays() {
@@ -533,8 +539,90 @@ func (t *Term) longCommandCanceled() bool {
 	return t.longCommandCancelFlag
 }
 
+// RedirectTo redirects the output of this terminal to the specified writer.
+func (t *Term) RedirectTo(w io.Writer) {
+	t.stdout.w = w
+}
+
 // isErrProcessExited returns true if `err` is an RPC error equivalent of proc.ErrProcessExited
 func isErrProcessExited(err error) bool {
 	rpcError, ok := err.(rpc.ServerError)
 	return ok && strings.Contains(rpcError.Error(), "has exited with status")
 }
+
+// transcriptWriter writes to a io.Writer and also, optionally, to a
+// buffered file.
+type transcriptWriter struct {
+	fileOnly     bool
+	w            io.Writer
+	file         *bufio.Writer
+	fh           io.Closer
+	colorEscapes map[colorize.Style]string
+}
+
+func (w *transcriptWriter) Write(p []byte) (nn int, err error) {
+	if !w.fileOnly {
+		nn, err = w.w.Write(p)
+	}
+	if err == nil {
+		if w.file != nil {
+			return w.file.Write(p)
+		}
+	}
+	return
+}
+
+// ColorizePrint prints to out a syntax highlighted version of the text read from
+// reader, between lines startLine and endLine.
+func (w *transcriptWriter) ColorizePrint(path string, reader io.ReadSeeker, startLine, endLine, arrowLine int) error {
+	var err error
+	if !w.fileOnly {
+		err = colorize.Print(w.w, path, reader, startLine, endLine, arrowLine, w.colorEscapes)
+	}
+	if err == nil {
+		if w.file != nil {
+			reader.Seek(0, io.SeekStart)
+			return colorize.Print(w.file, path, reader, startLine, endLine, arrowLine, nil)
+		}
+	}
+	return err
+}
+
+// Echo outputs str only to the optional transcript file.
+func (w *transcriptWriter) Echo(str string) {
+	if w.file != nil {
+		w.file.WriteString(str)
+	}
+}
+
+// Flush flushes the optional transcript file.
+func (w *transcriptWriter) Flush() {
+	if w.file != nil {
+		w.file.Flush()
+	}
+}
+
+// CloseTranscript closes the optional transcript file.
+func (w *transcriptWriter) CloseTranscript() error {
+	if w.file == nil {
+		return nil
+	}
+	w.file.Flush()
+	w.fileOnly = false
+	err := w.fh.Close()
+	w.file = nil
+	w.fh = nil
+	return err
+}
+
+// TranscribeTo starts transcribing the output to the specified file. If
+// fileOnly is true the output will only go to the file, output to the
+// io.Writer will be suppressed.
+func (w *transcriptWriter) TranscribeTo(fh io.WriteCloser, fileOnly bool) {
+	if w.file == nil {
+		w.CloseTranscript()
+	}
+	w.fh = fh
+	w.file = bufio.NewWriter(fh)
+	w.fileOnly = fileOnly
+}
diff --git a/service/dap/server.go b/service/dap/server.go
index c9001351..8ef5b1da 100644
--- a/service/dap/server.go
+++ b/service/dap/server.go
@@ -17,7 +17,7 @@ import (
 	"go/constant"
 	"go/parser"
 	"io"
-	"io/ioutil"
+	"math"
 	"net"
 	"os"
 	"os/exec"
@@ -586,35 +586,26 @@ func (s *Session) handleRequest(request dap.Message) {
 
 	// These requests, can be handled regardless of whether the targret is running
 	switch request := request.(type) {
-	case *dap.InitializeRequest:
-		// Required
+	case *dap.InitializeRequest: // Required
 		s.onInitializeRequest(request)
 		return
-	case *dap.LaunchRequest:
-		// Required
+	case *dap.LaunchRequest: // Required
 		s.onLaunchRequest(request)
 		return
-	case *dap.AttachRequest:
-		// Required
+	case *dap.AttachRequest: // Required
 		s.onAttachRequest(request)
 		return
-	case *dap.DisconnectRequest:
-		// Required
+	case *dap.DisconnectRequest: // Required
 		s.onDisconnectRequest(request)
 		return
-	case *dap.PauseRequest:
-		// Required
+	case *dap.PauseRequest: // Required
 		s.onPauseRequest(request)
 		return
-	case *dap.TerminateRequest:
-		// Optional (capability ‘supportsTerminateRequest‘)
-		// TODO: implement this request in V1
-		s.onTerminateRequest(request)
+	case *dap.TerminateRequest: // Optional (capability ‘supportsTerminateRequest‘)
+		/*TODO*/ s.onTerminateRequest(request) // not yet implemented
 		return
-	case *dap.RestartRequest:
-		// Optional (capability ‘supportsRestartRequest’)
-		// TODO: implement this request in V1
-		s.onRestartRequest(request)
+	case *dap.RestartRequest: // Optional (capability ‘supportsRestartRequest’)
+		/*TODO*/ s.onRestartRequest(request) // not yet implemented
 		return
 	}
 
@@ -637,7 +628,7 @@ func (s *Session) handleRequest(request dap.Message) {
 	// that would benefit from this approach at this time.
 	if s.debugger != nil && s.debugger.IsRunning() || s.isRunningCmd() {
 		switch request := request.(type) {
-		case *dap.ThreadsRequest:
+		case *dap.ThreadsRequest: // Required
 			// On start-up, the client requests the baseline of currently existing threads
 			// right away as there are a number of DAP requests that require a thread id
 			// (pause, continue, stacktrace, etc). This can happen after the program
@@ -649,7 +640,7 @@ func (s *Session) handleRequest(request dap.Message) {
 				Body:     dap.ThreadsResponseBody{Threads: []dap.Thread{{Id: -1, Name: "Current"}}},
 			}
 			s.send(response)
-		case *dap.SetBreakpointsRequest:
+		case *dap.SetBreakpointsRequest: // Required
 			s.changeStateMu.Lock()
 			defer s.changeStateMu.Unlock()
 			s.config.log.Debug("halting execution to set breakpoints")
@@ -659,7 +650,7 @@ func (s *Session) handleRequest(request dap.Message) {
 				return
 			}
 			s.onSetBreakpointsRequest(request)
-		case *dap.SetFunctionBreakpointsRequest:
+		case *dap.SetFunctionBreakpointsRequest: // Optional (capability ‘supportsFunctionBreakpoints’)
 			s.changeStateMu.Lock()
 			defer s.changeStateMu.Unlock()
 			s.config.log.Debug("halting execution to set breakpoints")
@@ -689,147 +680,104 @@ func (s *Session) handleRequest(request dap.Message) {
 
 	switch request := request.(type) {
 	//--- Asynchronous requests ---
-	case *dap.ConfigurationDoneRequest:
-		// Optional (capability ‘supportsConfigurationDoneRequest’)
+	case *dap.ConfigurationDoneRequest: // Optional (capability ‘supportsConfigurationDoneRequest’)
 		go func() {
 			defer s.recoverPanic(request)
 			s.onConfigurationDoneRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.ContinueRequest:
-		// Required
+	case *dap.ContinueRequest: // Required
 		go func() {
 			defer s.recoverPanic(request)
 			s.onContinueRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.NextRequest:
-		// Required
+	case *dap.NextRequest: // Required
 		go func() {
 			defer s.recoverPanic(request)
 			s.onNextRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.StepInRequest:
-		// Required
+	case *dap.StepInRequest: // Required
 		go func() {
 			defer s.recoverPanic(request)
 			s.onStepInRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.StepOutRequest:
-		// Required
+	case *dap.StepOutRequest: // Required
 		go func() {
 			defer s.recoverPanic(request)
 			s.onStepOutRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.StepBackRequest:
-		// Optional (capability ‘supportsStepBack’)
+	case *dap.StepBackRequest: // Optional (capability ‘supportsStepBack’)
 		go func() {
 			defer s.recoverPanic(request)
 			s.onStepBackRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
-	case *dap.ReverseContinueRequest:
-		// Optional (capability ‘supportsStepBack’)
+	case *dap.ReverseContinueRequest: // Optional (capability ‘supportsStepBack’)
 		go func() {
 			defer s.recoverPanic(request)
 			s.onReverseContinueRequest(request, resumeRequestLoop)
 		}()
 		<-resumeRequestLoop
 	//--- Synchronous requests ---
-	case *dap.SetBreakpointsRequest:
-		// Required
+	case *dap.SetBreakpointsRequest: // Required
 		s.onSetBreakpointsRequest(request)
-	case *dap.SetFunctionBreakpointsRequest:
-		// Optional (capability ‘supportsFunctionBreakpoints’)
+	case *dap.SetFunctionBreakpointsRequest: // Optional (capability ‘supportsFunctionBreakpoints’)
 		s.onSetFunctionBreakpointsRequest(request)
-	case *dap.SetInstructionBreakpointsRequest:
-		// Optional (capability 'supportsInstructionBreakpoints')
+	case *dap.SetInstructionBreakpointsRequest: // Optional (capability 'supportsInstructionBreakpoints')
 		s.onSetInstructionBreakpointsRequest(request)
-	case *dap.SetExceptionBreakpointsRequest:
-		// Optional (capability ‘exceptionBreakpointFilters’)
+	case *dap.SetExceptionBreakpointsRequest: // Optional (capability ‘exceptionBreakpointFilters’)
 		s.onSetExceptionBreakpointsRequest(request)
-	case *dap.ThreadsRequest:
-		// Required
+	case *dap.ThreadsRequest: // Required
 		s.onThreadsRequest(request)
-	case *dap.StackTraceRequest:
-		// Required
+	case *dap.StackTraceRequest: // Required
 		s.onStackTraceRequest(request)
-	case *dap.ScopesRequest:
-		// Required
+	case *dap.ScopesRequest: // Required
 		s.onScopesRequest(request)
-	case *dap.VariablesRequest:
-		// Required
+	case *dap.VariablesRequest: // Required
 		s.onVariablesRequest(request)
-	case *dap.EvaluateRequest:
-		// Required
+	case *dap.EvaluateRequest: // Required
 		s.onEvaluateRequest(request)
-	case *dap.SetVariableRequest:
-		// Optional (capability ‘supportsSetVariable’)
-		// Supported by vscode-go
-		// TODO: implement this request in V0
+	case *dap.SetVariableRequest: // Optional (capability ‘supportsSetVariable’)
 		s.onSetVariableRequest(request)
-	case *dap.SetExpressionRequest:
-		// Optional (capability ‘supportsSetExpression’)
-		// TODO: implement this request in V1
-		s.onSetExpressionRequest(request)
-	case *dap.LoadedSourcesRequest:
-		// Optional (capability ‘supportsLoadedSourcesRequest’)
-		// TODO: implement this request in V1
-		s.onLoadedSourcesRequest(request)
-	case *dap.ReadMemoryRequest:
-		// Optional (capability ‘supportsReadMemoryRequest‘)
-		// TODO: implement this request in V1
-		s.onReadMemoryRequest(request)
-	case *dap.DisassembleRequest:
-		// Optional (capability ‘supportsDisassembleRequest’)
-		// TODO: implement this request in V1
-		s.onDisassembleRequest(request)
-	case *dap.CancelRequest:
-		// Optional (capability ‘supportsCancelRequest’)
-		// TODO: does this request make sense for delve?
-		s.onCancelRequest(request)
-	case *dap.ExceptionInfoRequest:
-		// Optional (capability ‘supportsExceptionInfoRequest’)
+	case *dap.ExceptionInfoRequest: // Optional (capability ‘supportsExceptionInfoRequest’)
 		s.onExceptionInfoRequest(request)
+	case *dap.DisassembleRequest: // Optional (capability ‘supportsDisassembleRequest’)
+		s.onDisassembleRequest(request)
+	//--- Requests that we may want to support ---
+	case *dap.SourceRequest: // Required
+		/*TODO*/ s.sendUnsupportedErrorResponse(request.Request) // https://github.com/go-delve/delve/issues/2851
+	case *dap.SetExpressionRequest: // Optional (capability ‘supportsSetExpression’)
+		/*TODO*/ s.onSetExpressionRequest(request) // Not yet implemented
+	case *dap.LoadedSourcesRequest: // Optional (capability ‘supportsLoadedSourcesRequest’)
+		/*TODO*/ s.onLoadedSourcesRequest(request) // Not yet implemented
+	case *dap.ReadMemoryRequest: // Optional (capability ‘supportsReadMemoryRequest‘)
+		/*TODO*/ s.onReadMemoryRequest(request) // Not yet implemented
+	case *dap.CancelRequest: // Optional (capability ‘supportsCancelRequest’)
+		/*TODO*/ s.onCancelRequest(request) // Not yet implemented (does this make sense?)
+	case *dap.ModulesRequest: // Optional (capability ‘supportsModulesRequest’)
+		/*TODO*/ s.sendUnsupportedErrorResponse(request.Request) // Not yet implemented (does this make sense?)
 	//--- Requests that we do not plan to support ---
-	case *dap.RestartFrameRequest:
-		// Optional (capability ’supportsRestartFrame’)
-		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.GotoRequest:
-		// Optional (capability ‘supportsGotoTargetsRequest’)
+	case *dap.RestartFrameRequest: // Optional (capability ’supportsRestartFrame’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.SourceRequest:
-		// Required
-		// This does not make sense in the context of Go as
-		// the source cannot be a string eval'ed at runtime.
+	case *dap.GotoRequest: // Optional (capability ‘supportsGotoTargetsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.TerminateThreadsRequest:
-		// Optional (capability ‘supportsTerminateThreadsRequest’)
+	case *dap.TerminateThreadsRequest: // Optional (capability ‘supportsTerminateThreadsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.StepInTargetsRequest:
-		// Optional (capability ‘supportsStepInTargetsRequest’)
+	case *dap.StepInTargetsRequest: // Optional (capability ‘supportsStepInTargetsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.GotoTargetsRequest:
-		// Optional (capability ‘supportsGotoTargetsRequest’)
+	case *dap.GotoTargetsRequest: // Optional (capability ‘supportsGotoTargetsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.CompletionsRequest:
-		// Optional (capability ‘supportsCompletionsRequest’)
+	case *dap.CompletionsRequest: // Optional (capability ‘supportsCompletionsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.DataBreakpointInfoRequest:
-		// Optional (capability ‘supportsDataBreakpoints’)
+	case *dap.DataBreakpointInfoRequest: // Optional (capability ‘supportsDataBreakpoints’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.SetDataBreakpointsRequest:
-		// Optional (capability ‘supportsDataBreakpoints’)
+	case *dap.SetDataBreakpointsRequest: // Optional (capability ‘supportsDataBreakpoints’)
 		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.BreakpointLocationsRequest:
-		// Optional (capability ‘supportsBreakpointLocationsRequest’)
-		s.sendUnsupportedErrorResponse(request.Request)
-	case *dap.ModulesRequest:
-		// Optional (capability ‘supportsModulesRequest’)
-		// TODO: does this request make sense for delve?
+	case *dap.BreakpointLocationsRequest: // Optional (capability ‘supportsBreakpointLocationsRequest’)
 		s.sendUnsupportedErrorResponse(request.Request)
 	default:
 		// This is a DAP message that go-dap has a struct for, so
@@ -915,29 +863,10 @@ func (s *Session) setClientCapabilities(args dap.InitializeRequestArguments) {
 	s.clientCapabilities.supportsVariableType = args.SupportsVariableType
 }
 
-// Default output file pathname for the compiled binary in debug or test modes
-// when temporary debug binary creation fails.
+// Default output file pathname for the compiled binary in debug or test modes.
 // This is relative to the current working directory of the server.
 const defaultDebugBinary string = "./__debug_bin"
 
-func (s *Session) tempDebugBinary() string {
-	binaryPattern := "__debug_bin"
-	if runtime.GOOS == "windows" {
-		binaryPattern = "__debug_bin*.exe"
-	}
-	f, err := ioutil.TempFile("", binaryPattern)
-	if err != nil {
-		s.config.log.Errorf("failed to create a temporary binary (%v), falling back to %q", err, defaultDebugBinary)
-		return cleanExeName(defaultDebugBinary)
-	}
-	name := f.Name()
-	if err := f.Close(); err != nil {
-		s.config.log.Errorf("failed to create a temporary binary (%v), falling back to %q", err, defaultDebugBinary)
-		return cleanExeName(defaultDebugBinary)
-	}
-	return name
-}
-
 func cleanExeName(name string) string {
 	if runtime.GOOS == "windows" && filepath.Ext(name) != ".exe" {
 		return name + ".exe"
@@ -969,6 +898,20 @@ func (s *Session) onLaunchRequest(request *dap.LaunchRequest) {
 		}
 	}
 
+	for k, v := range args.Env {
+		if v != nil {
+			if err := os.Setenv(k, *v); err != nil {
+				s.sendShowUserErrorResponse(request.Request, FailedToLaunch, "Failed to launch", fmt.Sprintf("failed to setenv(%v) - %v", k, err))
+				return
+			}
+		} else {
+			if err := os.Unsetenv(k); err != nil {
+				s.sendShowUserErrorResponse(request.Request, FailedToLaunch, "Failed to launch", fmt.Sprintf("failed to unsetenv(%v) - %v", k, err))
+				return
+			}
+		}
+	}
+
 	if args.Mode == "" {
 		args.Mode = "debug"
 	}
@@ -1019,7 +962,7 @@ func (s *Session) onLaunchRequest(request *dap.LaunchRequest) {
 	debugbinary := args.Program
 	if args.Mode == "debug" || args.Mode == "test" {
 		if args.Output == "" {
-			args.Output = s.tempDebugBinary()
+			args.Output = cleanExeName(defaultDebugBinary)
 		} else {
 			args.Output = cleanExeName(args.Output)
 		}
@@ -1100,9 +1043,9 @@ func (s *Session) onLaunchRequest(request *dap.LaunchRequest) {
 			if err := cmd.Wait(); err != nil {
 				s.config.log.Debugf("program exited with error: %v", err)
 			}
+			close(s.noDebugProcess.exited)
 			s.logToConsole(proc.ErrProcessExited{Pid: cmd.ProcessState.Pid(), Status: cmd.ProcessState.ExitCode()}.Error())
 			s.send(&dap.TerminatedEvent{Event: *newEvent("terminated")})
-			close(s.noDebugProcess.exited)
 		}()
 		return
 	}
@@ -1398,6 +1341,7 @@ func (s *Session) setBreakpoints(prefix string, totalBps int, metadataFunc func(
 		if _, ok := createdBps[want.name]; ok {
 			err = fmt.Errorf("breakpoint already exists")
 		} else {
+			got.Disabled = false
 			got.Cond = want.condition
 			got.HitCond = want.hitCondition
 			err = setLogMessage(got, want.logMessage)
@@ -2988,20 +2932,29 @@ func (s *Session) onReadMemoryRequest(request *dap.ReadMemoryRequest) {
 }
 
 var invalidInstruction = dap.DisassembledInstruction{
-	Address:     "out of bounds",
 	Instruction: "invalid instruction",
 }
 
 // onDisassembleRequest handles 'disassemble' requests.
 // Capability 'supportsDisassembleRequest' is set in 'initialize' response.
 func (s *Session) onDisassembleRequest(request *dap.DisassembleRequest) {
+	// TODO(suzmue): microsoft/vscode#129655 is discussing the difference between
+	// memory reference and instructionPointerReference, which are currently
+	// being used interchangeably by vscode.
+	addr, err := strconv.ParseUint(request.Arguments.MemoryReference, 0, 64)
+	if err != nil {
+		s.sendErrorResponse(request.Request, UnableToDisassemble, "Unable to disassemble", err.Error())
+		return
+	}
+
 	// If the requested memory address is an invalid location, return all invalid instructions.
 	// TODO(suzmue): consider adding fake addresses that would allow us to receive out of bounds
 	// requests that include valid instructions designated by InstructionOffset or InstructionCount.
-	if request.Arguments.MemoryReference == invalidInstruction.Address {
+	if addr == 0 || addr == uint64(math.MaxUint64) {
 		instructions := make([]dap.DisassembledInstruction, request.Arguments.InstructionCount)
 		for i := range instructions {
 			instructions[i] = invalidInstruction
+			instructions[i].Address = request.Arguments.MemoryReference
 		}
 		response := &dap.DisassembleResponse{
 			Response: *newResponse(request.Request),
@@ -3012,21 +2965,13 @@ func (s *Session) onDisassembleRequest(request *dap.DisassembleRequest) {
 		s.send(response)
 		return
 	}
-	// TODO(suzmue): microsoft/vscode#129655 is discussing the difference between
-	// memory reference and instructionPointerReference, which are currently
-	// being used interchangeably by vscode.
-	addr, err := strconv.ParseInt(request.Arguments.MemoryReference, 0, 64)
-	if err != nil {
-		s.sendErrorResponse(request.Request, UnableToDisassemble, "Unable to disassemble", err.Error())
-		return
-	}
 
 	start := uint64(addr)
 	maxInstructionLength := s.debugger.Target().BinInfo().Arch.MaxInstructionLength()
 	byteOffset := request.Arguments.InstructionOffset * maxInstructionLength
 	// Adjust the offset to include instructions before the requested address.
 	if byteOffset < 0 {
-		start = uint64(addr + int64(byteOffset))
+		start = uint64(int(addr) + byteOffset)
 	}
 	// Adjust the number of instructions to include enough instructions after
 	// the requested address.
@@ -3034,7 +2979,7 @@ func (s *Session) onDisassembleRequest(request *dap.DisassembleRequest) {
 	if byteOffset > 0 {
 		count += byteOffset
 	}
-	end := uint64(addr + int64(count*maxInstructionLength))
+	end := uint64(int(addr) + count*maxInstructionLength)
 
 	// Make sure the PCs are lined up with instructions.
 	start, end = alignPCs(s.debugger.Target().BinInfo(), start, end)
@@ -3057,10 +3002,20 @@ func (s *Session) onDisassembleRequest(request *dap.DisassembleRequest) {
 	instructions := make([]dap.DisassembledInstruction, request.Arguments.InstructionCount)
 	lastFile, lastLine := "", -1
 	for i := range instructions {
-		if i < offset || (i-offset) >= len(procInstructions) {
+		// i is not in a valid range, use an address that is just before or after
+		// the range. This ensures that it can still be parsed as an int.
+		if i < offset {
+			// i is not in a valid range.
+			instructions[i] = invalidInstruction
+			instructions[i].Address = "0x0"
+			continue
+		}
+		if (i - offset) >= len(procInstructions) {
 			// i is not in a valid range.
 			instructions[i] = invalidInstruction
+			instructions[i].Address = fmt.Sprintf("%#x", uint64(math.MaxUint64))
 			continue
+
 		}
 		instruction := api.ConvertAsmInstruction(procInstructions[i-offset], s.debugger.AsmInstructionText(&procInstructions[i-offset], proc.GoFlavour))
 		instructions[i] = dap.DisassembledInstruction{
@@ -3085,9 +3040,9 @@ func (s *Session) onDisassembleRequest(request *dap.DisassembleRequest) {
 	s.send(response)
 }
 
-func findInstructions(procInstructions []proc.AsmInstruction, addr int64, instructionOffset, count int) ([]proc.AsmInstruction, int, error) {
+func findInstructions(procInstructions []proc.AsmInstruction, addr uint64, instructionOffset, count int) ([]proc.AsmInstruction, int, error) {
 	ref := sort.Search(len(procInstructions), func(i int) bool {
-		return procInstructions[i].Loc.PC >= uint64(addr)
+		return procInstructions[i].Loc.PC >= addr
 	})
 	if ref == len(procInstructions) || procInstructions[ref].Loc.PC != uint64(addr) {
 		return nil, -1, fmt.Errorf("could not find memory reference")
@@ -3115,6 +3070,10 @@ func findInstructions(procInstructions []proc.AsmInstruction, addr int64, instru
 	return procInstructions[startIdx:endIdx], offset, nil
 }
 
+func getValidRange(bi *proc.BinaryInfo) (uint64, uint64) {
+	return bi.Functions[0].Entry, bi.Functions[len(bi.Functions)-1].End
+}
+
 func alignPCs(bi *proc.BinaryInfo, start, end uint64) (uint64, uint64) {
 	// We want to find the function locations position that would enclose
 	// the range from start to end.
@@ -3180,11 +3139,12 @@ func alignPCs(bi *proc.BinaryInfo, start, end uint64) (uint64, uint64) {
 }
 
 func checkOutOfAddressSpace(pc uint64, bi *proc.BinaryInfo) (bool, uint64) {
-	if pc < bi.Functions[0].Entry {
-		return true, bi.Functions[0].Entry
+	entry, end := getValidRange(bi)
+	if pc < entry {
+		return true, entry
 	}
-	if pc >= bi.Functions[len(bi.Functions)-1].End {
-		return true, bi.Functions[len(bi.Functions)-1].End
+	if pc >= end {
+		return true, end
 	}
 	return false, pc
 }
diff --git a/service/dap/types.go b/service/dap/types.go
index 5625355a..e078b500 100644
--- a/service/dap/types.go
+++ b/service/dap/types.go
@@ -129,6 +129,15 @@ type LaunchConfig struct {
 	// directory.
 	DlvCwd string `json:"dlvCwd,omitempty"`
 
+	// Env specifies optional environment variables for Delve server
+	// in addition to the environment variables Delve initially
+	// started with.
+	// Variables with 'nil' values can be used to unset the named
+	// environment variables.
+	// Values are interpreted verbatim. Variable substitution or
+	// reference to other environment variables is not supported.
+	Env map[string]*string `json:"env,omitempty"`
+
 	LaunchAttachCommonConfig
 }
 
diff --git a/service/debugger/debugger.go b/service/debugger/debugger.go
index d5a721b1..17c562ba 100644
--- a/service/debugger/debugger.go
+++ b/service/debugger/debugger.go
@@ -770,12 +770,10 @@ func (d *Debugger) CreateEBPFTracepoint(fnName string) error {
 	return d.target.SetEBPFTracepoint(fnName)
 }
 
-// AmendBreakpoint will update the breakpoint with the matching ID.
+// amendBreakpoint will update the breakpoint with the matching ID.
 // It also enables or disables the breakpoint.
-func (d *Debugger) AmendBreakpoint(amend *api.Breakpoint) error {
-	d.targetMutex.Lock()
-	defer d.targetMutex.Unlock()
-
+// We can consume this function to avoid locking a goroutine.
+func (d *Debugger) amendBreakpoint(amend *api.Breakpoint) error {
 	originals := d.findBreakpoint(amend.ID)
 
 	if len(originals) > 0 && originals[0].WatchExpr != "" && amend.Disabled {
@@ -792,6 +790,17 @@ func (d *Debugger) AmendBreakpoint(amend *api.Breakpoint) error {
 			return err
 		}
 		copyBreakpointInfo(bp, amend)
+		if breaklet := bp.UserBreaklet(); breaklet != nil {
+			breaklet.TotalHitCount = amend.TotalHitCount
+			breaklet.HitCount = map[int]uint64{}
+			for idx := range amend.HitCount {
+				i, err := strconv.Atoi(idx)
+				if err != nil {
+					return fmt.Errorf("can't convert goroutine ID: %w", err)
+				}
+				breaklet.HitCount[i] = amend.HitCount[idx]
+			}
+		}
 		delete(d.disabledBreakpoints, amend.ID)
 	}
 	if amend.Disabled && !disabled { // disable the breakpoint
@@ -809,6 +818,15 @@ func (d *Debugger) AmendBreakpoint(amend *api.Breakpoint) error {
 	return nil
 }
 
+// AmendBreakpoint will update the breakpoint with the matching ID.
+// It also enables or disables the breakpoint.
+func (d *Debugger) AmendBreakpoint(amend *api.Breakpoint) error {
+	d.targetMutex.Lock()
+	defer d.targetMutex.Unlock()
+
+	return d.amendBreakpoint(amend)
+}
+
 // CancelNext will clear internal breakpoints, thus cancelling the 'next',
 // 'step' or 'stepout' operation.
 func (d *Debugger) CancelNext() error {
@@ -957,6 +975,33 @@ func (d *Debugger) clearBreakpoint(requestedBp *api.Breakpoint) (*api.Breakpoint
 	return clearedBp, nil
 }
 
+// isBpHitCondNotSatisfiable returns true if the breakpoint bp has a hit
+// condition that is no more satisfiable.
+// The hit condition is considered no more satisfiable if it can no longer be
+// hit again, for example with {Op: "==", Val: 1} and TotalHitCount == 1.
+func isBpHitCondNotSatisfiable(bp *api.Breakpoint) bool {
+	if bp.HitCond == "" {
+		return false
+	}
+
+	tok, val, err := parseHitCondition(bp.HitCond)
+	if err != nil {
+		return false
+	}
+	switch tok {
+	case token.EQL, token.LEQ:
+		if int(bp.TotalHitCount) >= val {
+			return true
+		}
+	case token.LSS:
+		if int(bp.TotalHitCount) >= val-1 {
+			return true
+		}
+	}
+
+	return false
+}
+
 // Breakpoints returns the list of current breakpoints.
 func (d *Debugger) Breakpoints(all bool) []*api.Breakpoint {
 	d.targetMutex.Lock()
@@ -1284,6 +1329,10 @@ func (d *Debugger) Command(command *api.DebuggerCommand, resumeNotify chan struc
 			}
 		}
 	}
+	if bp := state.CurrentThread.Breakpoint; bp != nil && isBpHitCondNotSatisfiable(bp) {
+		bp.Disabled = true
+		d.amendBreakpoint(bp)
+	}
 	return state, err
 }
 
diff --git a/vendor/github.com/peterh/liner/README.md b/vendor/github.com/peterh/liner/README.md
index 8df46ec2..04f5bbe7 100644
--- a/vendor/github.com/peterh/liner/README.md
+++ b/vendor/github.com/peterh/liner/README.md
@@ -6,6 +6,13 @@ everything Unix-like is a VT100 (or is trying very hard to be). If your
 terminal is not pretending to be a VT100, change it. Liner also support
 Windows.
 
+Liner is intended for use by cross-platform applications. Therefore, the
+decision was made to write it in pure Go, avoiding cgo, for ease of cross
+compilation. Furthermore, features only supported on some platforms have
+been intentionally omitted. For example, Ctrl-Z is "suspend" on Unix, but
+"EOF" on Windows. In the interest of making an application behave the same
+way on every supported platform, Ctrl-Z is ignored by Liner.
+
 Liner is released under the X11 license (which is similar to the new BSD
 license).
 
@@ -40,6 +47,12 @@ Ctrl-Y       | Paste from Yank buffer (Alt-Y to paste next yank instead)
 Tab          | Next completion
 Shift-Tab    | (after Tab) Previous completion
 
+Note that "Previous" and "Next match from history" will retain the part of
+the line that the user has already typed, similar to zsh's
+"up-line-or-beginning-search" (which is the default on some systems) or
+bash's "history-search-backward" (which is my preferred behaviour, but does
+not appear to be the default `Up` keybinding on any system).
+
 Getting started
 -----------------
 
diff --git a/vendor/github.com/peterh/liner/bsdinput.go b/vendor/github.com/peterh/liner/bsdinput.go
index 35933982..0a2abfb5 100644
--- a/vendor/github.com/peterh/liner/bsdinput.go
+++ b/vendor/github.com/peterh/liner/bsdinput.go
@@ -1,3 +1,4 @@
+//go:build openbsd || freebsd || netbsd
 // +build openbsd freebsd netbsd
 
 package liner
diff --git a/vendor/github.com/peterh/liner/fallbackinput.go b/vendor/github.com/peterh/liner/fallbackinput.go
index 043fb332..81a10a43 100644
--- a/vendor/github.com/peterh/liner/fallbackinput.go
+++ b/vendor/github.com/peterh/liner/fallbackinput.go
@@ -1,4 +1,5 @@
-// +build !windows,!linux,!darwin,!openbsd,!freebsd,!netbsd
+//go:build !windows && !linux && !darwin && !openbsd && !freebsd && !netbsd && !solaris
+// +build !windows,!linux,!darwin,!openbsd,!freebsd,!netbsd,!solaris
 
 package liner
 
diff --git a/vendor/github.com/peterh/liner/go.mod b/vendor/github.com/peterh/liner/go.mod
index 6804de36..a246b2db 100644
--- a/vendor/github.com/peterh/liner/go.mod
+++ b/vendor/github.com/peterh/liner/go.mod
@@ -1,3 +1,6 @@
 module github.com/peterh/liner
 
-require github.com/mattn/go-runewidth v0.0.3
+require (
+	github.com/mattn/go-runewidth v0.0.3
+	golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
+)
diff --git a/vendor/github.com/peterh/liner/go.sum b/vendor/github.com/peterh/liner/go.sum
index 1c189160..2074957d 100644
--- a/vendor/github.com/peterh/liner/go.sum
+++ b/vendor/github.com/peterh/liner/go.sum
@@ -1,2 +1,4 @@
 github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
 github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
+golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
diff --git a/vendor/github.com/peterh/liner/input.go b/vendor/github.com/peterh/liner/input.go
index b7c1453b..be8a61e1 100644
--- a/vendor/github.com/peterh/liner/input.go
+++ b/vendor/github.com/peterh/liner/input.go
@@ -1,4 +1,5 @@
-// +build linux darwin openbsd freebsd netbsd
+//go:build linux || darwin || openbsd || freebsd || netbsd || solaris
+// +build linux darwin openbsd freebsd netbsd solaris
 
 package liner
 
@@ -41,7 +42,7 @@ func NewLiner() *State {
 	} else {
 		s.inputRedirected = true
 	}
-	if _, err := getMode(syscall.Stdout); err != 0 {
+	if _, err := getMode(syscall.Stdout); err != nil {
 		s.outputRedirected = true
 	}
 	if s.inputRedirected && s.outputRedirected {
@@ -52,6 +53,8 @@ func NewLiner() *State {
 		mode.Iflag &^= icrnl | inpck | istrip | ixon
 		mode.Cflag |= cs8
 		mode.Lflag &^= syscall.ECHO | icanon | iexten
+		mode.Cc[syscall.VMIN] = 1
+		mode.Cc[syscall.VTIME] = 0
 		mode.ApplyMode()
 
 		winch := make(chan os.Signal, 1)
diff --git a/vendor/github.com/peterh/liner/input_darwin.go b/vendor/github.com/peterh/liner/input_darwin.go
index e98ab4a4..a91dc014 100644
--- a/vendor/github.com/peterh/liner/input_darwin.go
+++ b/vendor/github.com/peterh/liner/input_darwin.go
@@ -1,3 +1,4 @@
+//go:build darwin
 // +build darwin
 
 package liner
diff --git a/vendor/github.com/peterh/liner/input_linux.go b/vendor/github.com/peterh/liner/input_linux.go
index 56ed185f..95dab818 100644
--- a/vendor/github.com/peterh/liner/input_linux.go
+++ b/vendor/github.com/peterh/liner/input_linux.go
@@ -1,3 +1,4 @@
+//go:build linux
 // +build linux
 
 package liner
diff --git a/vendor/github.com/peterh/liner/input_solaris.go b/vendor/github.com/peterh/liner/input_solaris.go
new file mode 100644
index 00000000..34c72aee
--- /dev/null
+++ b/vendor/github.com/peterh/liner/input_solaris.go
@@ -0,0 +1,26 @@
+package liner
+
+import (
+	"golang.org/x/sys/unix"
+)
+
+const (
+	getTermios = unix.TCGETS
+	setTermios = unix.TCSETS
+)
+
+const (
+	icrnl  = unix.ICRNL
+	inpck  = unix.INPCK
+	istrip = unix.ISTRIP
+	ixon   = unix.IXON
+	opost  = unix.OPOST
+	cs8    = unix.CS8
+	isig   = unix.ISIG
+	icanon = unix.ICANON
+	iexten = unix.IEXTEN
+)
+
+type termios unix.Termios
+
+const cursorColumn = false
diff --git a/vendor/github.com/peterh/liner/input_windows.go b/vendor/github.com/peterh/liner/input_windows.go
index 541ad514..2f308b34 100644
--- a/vendor/github.com/peterh/liner/input_windows.go
+++ b/vendor/github.com/peterh/liner/input_windows.go
@@ -174,14 +174,13 @@ func (s *State) readNext() (interface{}, error) {
 	}
 
 	var input input_record
-	pbuf := uintptr(unsafe.Pointer(&input))
 	var rv uint32
-	prv := uintptr(unsafe.Pointer(&rv))
 
 	var surrogate uint16
 
 	for {
-		ok, _, err := procReadConsoleInput.Call(uintptr(s.handle), pbuf, 1, prv)
+		ok, _, err := procReadConsoleInput.Call(uintptr(s.handle),
+			uintptr(unsafe.Pointer(&input)), 1, uintptr(unsafe.Pointer(&rv)))
 
 		if ok == 0 {
 			return nil, err
diff --git a/vendor/github.com/peterh/liner/line.go b/vendor/github.com/peterh/liner/line.go
index 05a94beb..417bb90e 100644
--- a/vendor/github.com/peterh/liner/line.go
+++ b/vendor/github.com/peterh/liner/line.go
@@ -1,4 +1,5 @@
-// +build windows linux darwin openbsd freebsd netbsd
+//go:build windows || linux || darwin || openbsd || freebsd || netbsd || solaris
+// +build windows linux darwin openbsd freebsd netbsd solaris
 
 package liner
 
diff --git a/vendor/github.com/peterh/liner/output.go b/vendor/github.com/peterh/liner/output.go
index db0641cf..f1ac510e 100644
--- a/vendor/github.com/peterh/liner/output.go
+++ b/vendor/github.com/peterh/liner/output.go
@@ -1,4 +1,5 @@
-// +build linux darwin openbsd freebsd netbsd
+//go:build linux || darwin || openbsd || freebsd || netbsd || solaris
+// +build linux darwin openbsd freebsd netbsd solaris
 
 package liner
 
@@ -6,8 +7,6 @@ import (
 	"fmt"
 	"os"
 	"strings"
-	"syscall"
-	"unsafe"
 )
 
 func (s *State) cursorPos(x int) {
@@ -48,17 +47,6 @@ type winSize struct {
 	xpixel, ypixel uint16
 }
 
-func (s *State) getColumns() bool {
-	var ws winSize
-	ok, _, _ := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdout),
-		syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws)))
-	if int(ok) < 0 {
-		return false
-	}
-	s.columns = int(ws.col)
-	return true
-}
-
 func (s *State) checkOutput() {
 	// xterm is known to support CHA
 	if strings.Contains(strings.ToLower(os.Getenv("TERM")), "xterm") {
diff --git a/vendor/github.com/peterh/liner/output_solaris.go b/vendor/github.com/peterh/liner/output_solaris.go
new file mode 100644
index 00000000..2b8adf2a
--- /dev/null
+++ b/vendor/github.com/peterh/liner/output_solaris.go
@@ -0,0 +1,14 @@
+package liner
+
+import (
+	"golang.org/x/sys/unix"
+)
+
+func (s *State) getColumns() bool {
+	ws, err := unix.IoctlGetWinsize(unix.Stdout, unix.TIOCGWINSZ)
+	if err != nil {
+		return false
+	}
+	s.columns = int(ws.Col)
+	return true
+}
diff --git a/vendor/github.com/peterh/liner/output_unix.go b/vendor/github.com/peterh/liner/output_unix.go
new file mode 100644
index 00000000..8f0ba719
--- /dev/null
+++ b/vendor/github.com/peterh/liner/output_unix.go
@@ -0,0 +1,20 @@
+//go:build linux || darwin || openbsd || freebsd || netbsd
+// +build linux darwin openbsd freebsd netbsd
+
+package liner
+
+import (
+	"syscall"
+	"unsafe"
+)
+
+func (s *State) getColumns() bool {
+	var ws winSize
+	ok, _, _ := syscall.Syscall(syscall.SYS_IOCTL, uintptr(syscall.Stdout),
+		syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&ws)))
+	if int(ok) < 0 {
+		return false
+	}
+	s.columns = int(ws.col)
+	return true
+}
diff --git a/vendor/github.com/peterh/liner/unixmode.go b/vendor/github.com/peterh/liner/unixmode.go
index 9838923f..59b3d468 100644
--- a/vendor/github.com/peterh/liner/unixmode.go
+++ b/vendor/github.com/peterh/liner/unixmode.go
@@ -1,3 +1,4 @@
+//go:build linux || darwin || freebsd || openbsd || netbsd
 // +build linux darwin freebsd openbsd netbsd
 
 package liner
@@ -21,17 +22,16 @@ func (mode *termios) ApplyMode() error {
 // This function is provided for convenience, and should
 // not be necessary for most users of liner.
 func TerminalMode() (ModeApplier, error) {
-	mode, errno := getMode(syscall.Stdin)
-
-	if errno != 0 {
-		return nil, errno
-	}
-	return mode, nil
+	return getMode(syscall.Stdin)
 }
 
-func getMode(handle int) (*termios, syscall.Errno) {
+func getMode(handle int) (*termios, error) {
 	var mode termios
+	var err error
 	_, _, errno := syscall.Syscall(syscall.SYS_IOCTL, uintptr(handle), getTermios, uintptr(unsafe.Pointer(&mode)))
+	if errno != 0 {
+		err = errno
+	}
 
-	return &mode, errno
+	return &mode, err
 }
diff --git a/vendor/github.com/peterh/liner/unixmode_solaris.go b/vendor/github.com/peterh/liner/unixmode_solaris.go
new file mode 100644
index 00000000..4926d0b5
--- /dev/null
+++ b/vendor/github.com/peterh/liner/unixmode_solaris.go
@@ -0,0 +1,22 @@
+package liner
+
+import (
+	"golang.org/x/sys/unix"
+)
+
+func (mode *termios) ApplyMode() error {
+	return unix.IoctlSetTermios(unix.Stdin, setTermios, (*unix.Termios)(mode))
+}
+
+// TerminalMode returns the current terminal input mode as an InputModeSetter.
+//
+// This function is provided for convenience, and should
+// not be necessary for most users of liner.
+func TerminalMode() (ModeApplier, error) {
+	return getMode(unix.Stdin)
+}
+
+func getMode(handle int) (*termios, error) {
+	tos, err := unix.IoctlGetTermios(handle, getTermios)
+	return (*termios)(tos), err
+}
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
index 474efad0..7d3c060e 100644
--- a/vendor/golang.org/x/sys/unix/README.md
+++ b/vendor/golang.org/x/sys/unix/README.md
@@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
 Then, edit the regex (if necessary) to match the desired constant. Avoid making
 the regex too broad to avoid matching unintended constants.
 
-### mkmerge.go
+### internal/mkmerge
 
 This program is used to extract duplicate const, func, and type declarations
 from the generated architecture-specific files listed below, and merge these
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index 396aadf8..ee736234 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
 	# Use the Docker-based build system
 	# Files generated through docker (use $cmd so you can Ctl-C the build or run)
 	$cmd docker build --tag generate:$GOOS $GOOS
-	$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
+	$cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
 	exit
 fi
 
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index a74ef58f..4945739e 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -239,6 +239,7 @@ struct ltchars {
 #include <linux/magic.h>
 #include <linux/memfd.h>
 #include <linux/module.h>
+#include <linux/mount.h>
 #include <linux/netfilter/nfnetlink.h>
 #include <linux/netlink.h>
 #include <linux/net_namespace.h>
@@ -520,7 +521,7 @@ ccflags="$@"
 		$2 ~ /^HW_MACHINE$/ ||
 		$2 ~ /^SYSCTL_VERS/ ||
 		$2 !~ "MNT_BITS" &&
-		$2 ~ /^(MS|MNT|UMOUNT)_/ ||
+		$2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
 		$2 ~ /^NS_GET_/ ||
 		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
 		$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index 8bf45705..5f63147e 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
@@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
 	ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
 	return &ucred, nil
 }
+
+// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
+func PktInfo4(info *Inet4Pktinfo) []byte {
+	b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
+	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+	h.Level = SOL_IP
+	h.Type = IP_PKTINFO
+	h.SetLen(CmsgLen(SizeofInet4Pktinfo))
+	*(*Inet4Pktinfo)(h.data(0)) = *info
+	return b
+}
+
+// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
+func PktInfo6(info *Inet6Pktinfo) []byte {
+	b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
+	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+	h.Level = SOL_IPV6
+	h.Type = IPV6_PKTINFO
+	h.SetLen(CmsgLen(SizeofInet6Pktinfo))
+	*(*Inet6Pktinfo)(h.data(0)) = *info
+	return b
+}
+
+// ParseOrigDstAddr decodes a socket control message containing the original
+// destination address. To receive such a message the IP_RECVORIGDSTADDR or
+// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
+func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
+	switch {
+	case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
+		pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
+		sa := new(SockaddrInet4)
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+		sa.Port = int(p[0])<<8 + int(p[1])
+		sa.Addr = pp.Addr
+		return sa, nil
+
+	case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
+		pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
+		sa := new(SockaddrInet6)
+		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+		sa.Port = int(p[0])<<8 + int(p[1])
+		sa.ZoneId = pp.Scope_id
+		sa.Addr = pp.Addr
+		return sa, nil
+
+	default:
+		return nil, EINVAL
+	}
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index d8efb715..6192750c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -70,9 +70,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
 }
 
@@ -85,9 +83,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
 }
 
@@ -261,9 +257,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa := new(SockaddrInet4)
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_INET6:
@@ -272,9 +266,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
 		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 	}
 	return nil, EAFNOSUPPORT
@@ -385,6 +377,11 @@ func (w WaitStatus) TrapCause() int { return -1 }
 
 //sys	fcntl(fd int, cmd int, arg int) (val int, err error)
 
+//sys	fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
+func Fsync(fd int) error {
+	return fsyncRange(fd, O_SYNC, 0, 0)
+}
+
 /*
  * Direct access
  */
@@ -401,7 +398,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
 //sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
 //sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
 //sys	Fdatasync(fd int) (err error)
-//sys	Fsync(fd int) (err error)
 // readdir_r
 //sysnb	Getpgid(pid int) (pgid int, err error)
 
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 95ac3946..0ce45232 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -163,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
 }
 
@@ -179,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
 }
 
@@ -210,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	sa.raw.Nlen = sa.Nlen
 	sa.raw.Alen = sa.Alen
 	sa.raw.Slen = sa.Slen
-	for i := 0; i < len(sa.raw.Data); i++ {
-		sa.raw.Data[i] = sa.Data[i]
-	}
+	sa.raw.Data = sa.Data
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
 }
 
@@ -228,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa.Nlen = pp.Nlen
 		sa.Alen = pp.Alen
 		sa.Slen = pp.Slen
-		for i := 0; i < len(sa.Data); i++ {
-			sa.Data[i] = pp.Data[i]
-		}
+		sa.Data = pp.Data
 		return sa, nil
 
 	case AF_UNIX:
@@ -262,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa := new(SockaddrInet4)
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_INET6:
@@ -273,9 +263,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
 		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 	}
 	return anyToSockaddrGOOS(fd, rsa)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index a8c13317..8826f414 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -430,8 +430,25 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
 	return x, err
 }
 
-func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
-	mib, err := sysctlmib(name)
+func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
+	mib, err := sysctlmib(name, args...)
+	if err != nil {
+		return nil, err
+	}
+
+	var kinfo KinfoProc
+	n := uintptr(SizeofKinfoProc)
+	if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
+		return nil, err
+	}
+	if n != SizeofKinfoProc {
+		return nil, EIO
+	}
+	return &kinfo, nil
+}
+
+func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
+	mib, err := sysctlmib(name, args...)
 	if err != nil {
 		return nil, err
 	}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index fff38a84..4bc5baf7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -372,9 +372,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
 }
 
@@ -387,9 +385,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
 }
 
@@ -438,9 +434,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	sa.raw.Hatype = sa.Hatype
 	sa.raw.Pkttype = sa.Pkttype
 	sa.raw.Halen = sa.Halen
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
 }
 
@@ -855,12 +849,10 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	if sa.Addr == nil {
 		return nil, 0, EINVAL
 	}
-
 	sa.raw.Family = AF_TIPC
 	sa.raw.Scope = int8(sa.Scope)
 	sa.raw.Addrtype = sa.Addr.tipcAddrtype()
 	sa.raw.Addr = sa.Addr.tipcAddr()
-
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
 }
 
@@ -874,9 +866,7 @@ type SockaddrL2TPIP struct {
 func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	sa.raw.Family = AF_INET
 	sa.raw.Conn_id = sa.ConnId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
 }
 
@@ -892,9 +882,7 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	sa.raw.Family = AF_INET6
 	sa.raw.Conn_id = sa.ConnId
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
 }
 
@@ -990,9 +978,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa.Hatype = pp.Hatype
 		sa.Pkttype = pp.Pkttype
 		sa.Halen = pp.Halen
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_UNIX:
@@ -1031,18 +1017,14 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 			pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
 			sa := new(SockaddrL2TPIP)
 			sa.ConnId = pp.Conn_id
-			for i := 0; i < len(sa.Addr); i++ {
-				sa.Addr[i] = pp.Addr[i]
-			}
+			sa.Addr = pp.Addr
 			return sa, nil
 		default:
 			pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
 			sa := new(SockaddrInet4)
 			p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 			sa.Port = int(p[0])<<8 + int(p[1])
-			for i := 0; i < len(sa.Addr); i++ {
-				sa.Addr[i] = pp.Addr[i]
-			}
+			sa.Addr = pp.Addr
 			return sa, nil
 		}
 
@@ -1058,9 +1040,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 			sa := new(SockaddrL2TPIP6)
 			sa.ConnId = pp.Conn_id
 			sa.ZoneId = pp.Scope_id
-			for i := 0; i < len(sa.Addr); i++ {
-				sa.Addr[i] = pp.Addr[i]
-			}
+			sa.Addr = pp.Addr
 			return sa, nil
 		default:
 			pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
@@ -1068,9 +1048,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 			p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 			sa.Port = int(p[0])<<8 + int(p[1])
 			sa.ZoneId = pp.Scope_id
-			for i := 0; i < len(sa.Addr); i++ {
-				sa.Addr[i] = pp.Addr[i]
-			}
+			sa.Addr = pp.Addr
 			return sa, nil
 		}
 
@@ -1797,6 +1775,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
 	return mount(source, target, fstype, flags, datap)
 }
 
+//sys	mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
+
+// MountSetattr is a wrapper for mount_setattr(2).
+// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
+//
+// Requires kernel >= 5.12.
+func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
+	return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
+}
+
 func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
 	if raceenabled {
 		raceReleaseMerge(unsafe.Pointer(&ioSync))
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index d2a6495c..8b88ac21 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -92,9 +92,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
 }
 
@@ -107,9 +105,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
 }
 
@@ -417,9 +413,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa := new(SockaddrInet4)
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_INET6:
@@ -428,9 +422,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
 		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 	}
 	return nil, EAFNOSUPPORT
diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index 1ffd8bfc..5fb76a14 100644
--- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -67,9 +67,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
 }
 
@@ -83,9 +81,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
 }
 
@@ -144,9 +140,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		sa := new(SockaddrInet4)
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_INET6:
@@ -155,9 +149,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
 		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 	}
 	return nil, EAFNOSUPPORT
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 78d4b85e..d175aae8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
 
 //go:build linux
 // +build linux
@@ -116,6 +116,7 @@ const (
 	ARPHRD_LAPB                                 = 0x204
 	ARPHRD_LOCALTLK                             = 0x305
 	ARPHRD_LOOPBACK                             = 0x304
+	ARPHRD_MCTP                                 = 0x122
 	ARPHRD_METRICOM                             = 0x17
 	ARPHRD_NETLINK                              = 0x338
 	ARPHRD_NETROM                               = 0x0
@@ -472,6 +473,7 @@ const (
 	DM_DEV_WAIT                                 = 0xc138fd08
 	DM_DIR                                      = "mapper"
 	DM_GET_TARGET_VERSION                       = 0xc138fd11
+	DM_IMA_MEASUREMENT_FLAG                     = 0x80000
 	DM_INACTIVE_PRESENT_FLAG                    = 0x40
 	DM_INTERNAL_SUSPEND_FLAG                    = 0x40000
 	DM_IOCTL                                    = 0xfd
@@ -716,6 +718,7 @@ const (
 	ETH_P_LOOPBACK                              = 0x9000
 	ETH_P_MACSEC                                = 0x88e5
 	ETH_P_MAP                                   = 0xf9
+	ETH_P_MCTP                                  = 0xfa
 	ETH_P_MOBITEX                               = 0x15
 	ETH_P_MPLS_MC                               = 0x8848
 	ETH_P_MPLS_UC                               = 0x8847
@@ -751,6 +754,21 @@ const (
 	ETH_P_WCCP                                  = 0x883e
 	ETH_P_X25                                   = 0x805
 	ETH_P_XDSA                                  = 0xf8
+	EV_ABS                                      = 0x3
+	EV_CNT                                      = 0x20
+	EV_FF                                       = 0x15
+	EV_FF_STATUS                                = 0x17
+	EV_KEY                                      = 0x1
+	EV_LED                                      = 0x11
+	EV_MAX                                      = 0x1f
+	EV_MSC                                      = 0x4
+	EV_PWR                                      = 0x16
+	EV_REL                                      = 0x2
+	EV_REP                                      = 0x14
+	EV_SND                                      = 0x12
+	EV_SW                                       = 0x5
+	EV_SYN                                      = 0x0
+	EV_VERSION                                  = 0x10001
 	EXABYTE_ENABLE_NEST                         = 0xf0
 	EXT2_SUPER_MAGIC                            = 0xef53
 	EXT3_SUPER_MAGIC                            = 0xef53
@@ -789,9 +807,11 @@ const (
 	FAN_DELETE_SELF                             = 0x400
 	FAN_DENY                                    = 0x2
 	FAN_ENABLE_AUDIT                            = 0x40
+	FAN_EPIDFD                                  = -0x2
 	FAN_EVENT_INFO_TYPE_DFID                    = 0x3
 	FAN_EVENT_INFO_TYPE_DFID_NAME               = 0x2
 	FAN_EVENT_INFO_TYPE_FID                     = 0x1
+	FAN_EVENT_INFO_TYPE_PIDFD                   = 0x4
 	FAN_EVENT_METADATA_LEN                      = 0x18
 	FAN_EVENT_ON_CHILD                          = 0x8000000
 	FAN_MARK_ADD                                = 0x1
@@ -811,6 +831,7 @@ const (
 	FAN_MOVE_SELF                               = 0x800
 	FAN_NOFD                                    = -0x1
 	FAN_NONBLOCK                                = 0x2
+	FAN_NOPIDFD                                 = -0x1
 	FAN_ONDIR                                   = 0x40000000
 	FAN_OPEN                                    = 0x20
 	FAN_OPEN_EXEC                               = 0x1000
@@ -821,6 +842,7 @@ const (
 	FAN_REPORT_DIR_FID                          = 0x400
 	FAN_REPORT_FID                              = 0x200
 	FAN_REPORT_NAME                             = 0x800
+	FAN_REPORT_PIDFD                            = 0x80
 	FAN_REPORT_TID                              = 0x100
 	FAN_UNLIMITED_MARKS                         = 0x20
 	FAN_UNLIMITED_QUEUE                         = 0x10
@@ -1454,6 +1476,18 @@ const (
 	MNT_FORCE                                   = 0x1
 	MODULE_INIT_IGNORE_MODVERSIONS              = 0x1
 	MODULE_INIT_IGNORE_VERMAGIC                 = 0x2
+	MOUNT_ATTR_IDMAP                            = 0x100000
+	MOUNT_ATTR_NOATIME                          = 0x10
+	MOUNT_ATTR_NODEV                            = 0x4
+	MOUNT_ATTR_NODIRATIME                       = 0x80
+	MOUNT_ATTR_NOEXEC                           = 0x8
+	MOUNT_ATTR_NOSUID                           = 0x2
+	MOUNT_ATTR_NOSYMFOLLOW                      = 0x200000
+	MOUNT_ATTR_RDONLY                           = 0x1
+	MOUNT_ATTR_RELATIME                         = 0x0
+	MOUNT_ATTR_SIZE_VER0                        = 0x20
+	MOUNT_ATTR_STRICTATIME                      = 0x20
+	MOUNT_ATTR__ATIME                           = 0x70
 	MSDOS_SUPER_MAGIC                           = 0x4d44
 	MSG_BATCH                                   = 0x40000
 	MSG_CMSG_CLOEXEC                            = 0x40000000
@@ -1997,6 +2031,7 @@ const (
 	PR_SPEC_ENABLE                              = 0x2
 	PR_SPEC_FORCE_DISABLE                       = 0x8
 	PR_SPEC_INDIRECT_BRANCH                     = 0x1
+	PR_SPEC_L1D_FLUSH                           = 0x2
 	PR_SPEC_NOT_AFFECTED                        = 0x0
 	PR_SPEC_PRCTL                               = 0x1
 	PR_SPEC_STORE_BYPASS                        = 0x0
@@ -2432,12 +2467,15 @@ const (
 	SMART_WRITE_THRESHOLDS                      = 0xd7
 	SMB_SUPER_MAGIC                             = 0x517b
 	SOCKFS_MAGIC                                = 0x534f434b
+	SOCK_BUF_LOCK_MASK                          = 0x3
 	SOCK_DCCP                                   = 0x6
 	SOCK_IOC_TYPE                               = 0x89
 	SOCK_PACKET                                 = 0xa
 	SOCK_RAW                                    = 0x3
+	SOCK_RCVBUF_LOCK                            = 0x2
 	SOCK_RDM                                    = 0x4
 	SOCK_SEQPACKET                              = 0x5
+	SOCK_SNDBUF_LOCK                            = 0x1
 	SOL_AAL                                     = 0x109
 	SOL_ALG                                     = 0x117
 	SOL_ATM                                     = 0x108
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 697811a4..3ca40ca7 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -5,7 +5,7 @@
 // +build 386,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
 
 package unix
 
@@ -293,6 +293,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 7d8d93bf..ead33209 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -5,7 +5,7 @@
 // +build amd64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
 
 package unix
 
@@ -294,6 +294,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index f707d508..39bdc945 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -5,7 +5,7 @@
 // +build arm,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -300,6 +300,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 3a67a9c8..9aec987d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -5,7 +5,7 @@
 // +build arm64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
 
 package unix
 
@@ -290,6 +290,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index a7ccef56..a8bba949 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -5,7 +5,7 @@
 // +build mips,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -293,6 +293,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x20
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index f7b7cec9..ee9e7e20 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -5,7 +5,7 @@
 // +build mips64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -293,6 +293,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x20
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 4fcacf95..ba4b288a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -5,7 +5,7 @@
 // +build mips64le,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -293,6 +293,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x20
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 6f6c223a..bc93afc3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -5,7 +5,7 @@
 // +build mipsle,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -293,6 +293,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x20
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 59e522bc..9295e694 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -5,7 +5,7 @@
 // +build ppc,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -348,6 +348,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index d4264a0f..1fa081c9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -5,7 +5,7 @@
 // +build ppc64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -352,6 +352,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 21cbec1d..74b32114 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -5,7 +5,7 @@
 // +build ppc64le,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -352,6 +352,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 9b05bf12..c91c8ac5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -5,7 +5,7 @@
 // +build riscv64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -281,6 +281,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index bd82ace0..b66bf222 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -5,7 +5,7 @@
 // +build s390x,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
 
 package unix
 
@@ -356,6 +356,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x30
 	SO_BROADCAST                     = 0x6
 	SO_BSDCOMPAT                     = 0xe
+	SO_BUF_LOCK                      = 0x48
 	SO_BUSY_POLL                     = 0x2e
 	SO_BUSY_POLL_BUDGET              = 0x46
 	SO_CNX_ADVICE                    = 0x35
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 1f8bded5..f7fb149b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -5,7 +5,7 @@
 // +build sparc64,linux
 
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
 
 package unix
 
@@ -347,6 +347,7 @@ const (
 	SO_BPF_EXTENSIONS                = 0x32
 	SO_BROADCAST                     = 0x20
 	SO_BSDCOMPAT                     = 0x400
+	SO_BUF_LOCK                      = 0x51
 	SO_BUSY_POLL                     = 0x30
 	SO_BUSY_POLL_BUDGET              = 0x49
 	SO_CNX_ADVICE                    = 0x37
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index 91a23cc7..85e0cc38 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -17,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
 int wait4(int, uintptr_t, int, uintptr_t);
 int ioctl(int, int, uintptr_t);
 int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
 int acct(uintptr_t);
 int chdir(uintptr_t);
 int chroot(uintptr_t);
@@ -29,7 +30,6 @@ int fchmod(int, unsigned int);
 int fchmodat(int, uintptr_t, unsigned int, int);
 int fchownat(int, uintptr_t, int, int, int);
 int fdatasync(int);
-int fsync(int);
 int getpgid(int);
 int getpgrp();
 int getpid();
@@ -255,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+	r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
+	if r0 == -1 && er != nil {
+		err = er
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Acct(path string) (err error) {
 	_p0 := uintptr(unsafe.Pointer(C.CString(path)))
 	r0, er := C.acct(C.uintptr_t(_p0))
@@ -379,16 +389,6 @@ func Fdatasync(fd int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Fsync(fd int) (err error) {
-	r0, er := C.fsync(C.int(fd))
-	if r0 == -1 && er != nil {
-		err = er
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getpgid(pid int) (pgid int, err error) {
 	r0, er := C.getpgid(C.int(pid))
 	pgid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index 33c2609b..f1d4a73b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -135,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+	_, e1 := callfsync_range(fd, how, start, length)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Acct(path string) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)
@@ -283,16 +293,6 @@ func Fdatasync(fd int) (err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func Fsync(fd int) (err error) {
-	_, e1 := callfsync(fd)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func Getpgid(pid int) (pgid int, err error) {
 	r0, e1 := callgetpgid(pid)
 	pgid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index 8b737fa9..2caa5adf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -18,6 +18,7 @@ import (
 //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
+//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
@@ -30,7 +31,6 @@ import (
 //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
-//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
 //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
@@ -136,6 +136,7 @@ import (
 //go:linkname libc_wait4 libc_wait4
 //go:linkname libc_ioctl libc_ioctl
 //go:linkname libc_fcntl libc_fcntl
+//go:linkname libc_fsync_range libc_fsync_range
 //go:linkname libc_acct libc_acct
 //go:linkname libc_chdir libc_chdir
 //go:linkname libc_chroot libc_chroot
@@ -148,7 +149,6 @@ import (
 //go:linkname libc_fchmodat libc_fchmodat
 //go:linkname libc_fchownat libc_fchownat
 //go:linkname libc_fdatasync libc_fdatasync
-//go:linkname libc_fsync libc_fsync
 //go:linkname libc_getpgid libc_getpgid
 //go:linkname libc_getpgrp libc_getpgrp
 //go:linkname libc_getpid libc_getpid
@@ -257,6 +257,7 @@ var (
 	libc_wait4,
 	libc_ioctl,
 	libc_fcntl,
+	libc_fsync_range,
 	libc_acct,
 	libc_chdir,
 	libc_chroot,
@@ -269,7 +270,6 @@ var (
 	libc_fchmodat,
 	libc_fchownat,
 	libc_fdatasync,
-	libc_fsync,
 	libc_getpgid,
 	libc_getpgrp,
 	libc_getpid,
@@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
 	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
 	return
@@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
-	r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
 	r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
 	return
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index 3c260917..944a714b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
 int wait4(int, uintptr_t, int, uintptr_t);
 int ioctl(int, int, uintptr_t);
 int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
 int acct(uintptr_t);
 int chdir(uintptr_t);
 int chroot(uintptr_t);
@@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
 int fchmodat(int, uintptr_t, unsigned int, int);
 int fchownat(int, uintptr_t, int, int, int);
 int fdatasync(int);
-int fsync(int);
 int getpgid(int);
 int getpgrp();
 int getpid();
@@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+	r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
+	e1 = syscall.GetErrno()
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
 	r1 = uintptr(C.acct(C.uintptr_t(_p0)))
 	e1 = syscall.GetErrno()
@@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
-	r1 = uintptr(C.fsync(C.int(fd)))
-	e1 = syscall.GetErrno()
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
 func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
 	r1 = uintptr(C.getpgid(C.int(pid)))
 	e1 = syscall.GetErrno()
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 4f5da1f5..93edda4c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
 
 //go:build linux
 // +build linux
@@ -409,6 +409,21 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
+	var _p0 *byte
+	_p0, err = BytePtrFromString(pathname)
+	if err != nil {
+		return
+	}
+	_, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Acct(path string) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index aa7ce85d..31847d23 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -444,4 +444,5 @@ const (
 	SYS_LANDLOCK_ADD_RULE            = 445
 	SYS_LANDLOCK_RESTRICT_SELF       = 446
 	SYS_MEMFD_SECRET                 = 447
+	SYS_PROCESS_MRELEASE             = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index b8303263..3503cbbd 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -366,4 +366,5 @@ const (
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
 	SYS_MEMFD_SECRET            = 447
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index d75f65a0..5ecd24bf 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -7,6 +7,7 @@
 package unix
 
 const (
+	SYS_SYSCALL_MASK                 = 0
 	SYS_RESTART_SYSCALL              = 0
 	SYS_EXIT                         = 1
 	SYS_FORK                         = 2
@@ -407,4 +408,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET      = 444
 	SYS_LANDLOCK_ADD_RULE            = 445
 	SYS_LANDLOCK_RESTRICT_SELF       = 446
+	SYS_PROCESS_MRELEASE             = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 8b02f09e..7e5c94cc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -311,4 +311,5 @@ const (
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
 	SYS_MEMFD_SECRET            = 447
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 026695ab..e1e2a2bf 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -428,4 +428,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET      = 4444
 	SYS_LANDLOCK_ADD_RULE            = 4445
 	SYS_LANDLOCK_RESTRICT_SELF       = 4446
+	SYS_PROCESS_MRELEASE             = 4448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 7320ba95..7651915a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -358,4 +358,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 5444
 	SYS_LANDLOCK_ADD_RULE       = 5445
 	SYS_LANDLOCK_RESTRICT_SELF  = 5446
+	SYS_PROCESS_MRELEASE        = 5448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index 45082dd6..a26a2c05 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -358,4 +358,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 5444
 	SYS_LANDLOCK_ADD_RULE       = 5445
 	SYS_LANDLOCK_RESTRICT_SELF  = 5446
+	SYS_PROCESS_MRELEASE        = 5448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 570a857a..fda9a6a9 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -428,4 +428,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET      = 4444
 	SYS_LANDLOCK_ADD_RULE            = 4445
 	SYS_LANDLOCK_RESTRICT_SELF       = 4446
+	SYS_PROCESS_MRELEASE             = 4448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index 638498d6..e8496150 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -435,4 +435,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET      = 444
 	SYS_LANDLOCK_ADD_RULE            = 445
 	SYS_LANDLOCK_RESTRICT_SELF       = 446
+	SYS_PROCESS_MRELEASE             = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 702beebf..5ee0678a 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -407,4 +407,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 444
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index bfc87ea4..29c0f9a3 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -407,4 +407,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 444
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index a390e147..5c9a9a3b 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -309,4 +309,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 444
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 3e791e6c..913f50f9 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -372,4 +372,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 444
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 78802a5c..0de03a72 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -386,4 +386,5 @@ const (
 	SYS_LANDLOCK_CREATE_RULESET = 444
 	SYS_LANDLOCK_ADD_RULE       = 445
 	SYS_LANDLOCK_RESTRICT_SELF  = 446
+	SYS_PROCESS_MRELEASE        = 448
 )
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 7efe5ccb..885842c0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -641,13 +641,13 @@ type Eproc struct {
 	Tdev    int32
 	Tpgid   int32
 	Tsess   uintptr
-	Wmesg   [8]int8
+	Wmesg   [8]byte
 	Xsize   int32
 	Xrssize int16
 	Xccount int16
 	Xswrss  int16
 	Flag    int32
-	Login   [12]int8
+	Login   [12]byte
 	Spare   [4]int32
 	_       [4]byte
 }
@@ -688,7 +688,7 @@ type ExternProc struct {
 	P_priority  uint8
 	P_usrpri    uint8
 	P_nice      int8
-	P_comm      [17]int8
+	P_comm      [17]byte
 	P_pgrp      uintptr
 	P_addr      uintptr
 	P_xstat     uint16
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index b23a2efe..b23c0233 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -641,13 +641,13 @@ type Eproc struct {
 	Tdev    int32
 	Tpgid   int32
 	Tsess   uintptr
-	Wmesg   [8]int8
+	Wmesg   [8]byte
 	Xsize   int32
 	Xrssize int16
 	Xccount int16
 	Xswrss  int16
 	Flag    int32
-	Login   [12]int8
+	Login   [12]byte
 	Spare   [4]int32
 	_       [4]byte
 }
@@ -688,7 +688,7 @@ type ExternProc struct {
 	P_priority  uint8
 	P_usrpri    uint8
 	P_nice      int8
-	P_comm      [17]int8
+	P_comm      [17]byte
 	P_pgrp      uintptr
 	P_addr      uintptr
 	P_xstat     uint16
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 249ecfcd..37b52143 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
 
 //go:build linux
 // +build linux
@@ -743,6 +743,8 @@ const (
 	AT_STATX_FORCE_SYNC   = 0x2000
 	AT_STATX_DONT_SYNC    = 0x4000
 
+	AT_RECURSIVE = 0x8000
+
 	AT_SYMLINK_FOLLOW   = 0x400
 	AT_SYMLINK_NOFOLLOW = 0x100
 
@@ -3264,7 +3266,8 @@ const (
 	LWTUNNEL_ENCAP_BPF        = 0x6
 	LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
 	LWTUNNEL_ENCAP_RPL        = 0x8
-	LWTUNNEL_ENCAP_MAX        = 0x8
+	LWTUNNEL_ENCAP_IOAM6      = 0x9
+	LWTUNNEL_ENCAP_MAX        = 0x9
 
 	MPLS_IPTUNNEL_UNSPEC = 0x0
 	MPLS_IPTUNNEL_DST    = 0x1
@@ -3617,7 +3620,9 @@ const (
 	ETHTOOL_A_COALESCE_TX_USECS_HIGH          = 0x15
 	ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH     = 0x16
 	ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL   = 0x17
-	ETHTOOL_A_COALESCE_MAX                    = 0x17
+	ETHTOOL_A_COALESCE_USE_CQE_MODE_TX        = 0x18
+	ETHTOOL_A_COALESCE_USE_CQE_MODE_RX        = 0x19
+	ETHTOOL_A_COALESCE_MAX                    = 0x19
 	ETHTOOL_A_PAUSE_UNSPEC                    = 0x0
 	ETHTOOL_A_PAUSE_HEADER                    = 0x1
 	ETHTOOL_A_PAUSE_AUTONEG                   = 0x2
@@ -3956,3 +3961,10 @@ const (
 	SHM_RDONLY = 0x1000
 	SHM_RND    = 0x2000
 )
+
+type MountAttr struct {
+	Attr_set    uint64
+	Attr_clr    uint64
+	Propagation uint64
+	Userns_fd   uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index eeeb9aa3..bea25494 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build 386 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index d30e1155..b8c8f289 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build amd64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 69d02975..4db44301 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build arm && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 28a0455b..3ebcad8a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build arm64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 64a84548..3eb33e48 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build mips && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index a1b7dee4..79a94467 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build mips64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 936fa6a2..8f4b107c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build mips64le && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 5dd546fb..e4eb2179 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build mipsle && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index 947b32e4..d5b21f0f 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build ppc && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 2a606151..5188d142 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build ppc64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index d0d735d0..de4dd4c7 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build ppc64le && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 95e3d6d0..dccbf9b0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build riscv64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index cccf1ef2..63588061 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build s390x && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 44fcbe4e..765edc13 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
 // Code generated by the command above; see README.md. DO NOT EDIT.
 
 //go:build sparc64 && linux
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 2a8b1e6f..baf5fe65 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -564,12 +564,11 @@ type Uvmexp struct {
 	Kmapent            int32
 }
 
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
 
 type Clockinfo struct {
-	Hz      int32
-	Tick    int32
-	Tickadj int32
-	Stathz  int32
-	Profhz  int32
+	Hz     int32
+	Tick   int32
+	Stathz int32
+	Profhz int32
 }
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index b1759cf7..e21ae8ec 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -564,12 +564,11 @@ type Uvmexp struct {
 	Kmapent            int32
 }
 
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
 
 type Clockinfo struct {
-	Hz      int32
-	Tick    int32
-	Tickadj int32
-	Stathz  int32
-	Profhz  int32
+	Hz     int32
+	Tick   int32
+	Stathz int32
+	Profhz int32
 }
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index e807de20..f190651c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -565,12 +565,11 @@ type Uvmexp struct {
 	Kmapent            int32
 }
 
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
 
 type Clockinfo struct {
-	Hz      int32
-	Tick    int32
-	Tickadj int32
-	Stathz  int32
-	Profhz  int32
+	Hz     int32
+	Tick   int32
+	Stathz int32
+	Profhz int32
 }
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index ff3aecae..84747c58 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -558,12 +558,11 @@ type Uvmexp struct {
 	Kmapent            int32
 }
 
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
 
 type Clockinfo struct {
-	Hz      int32
-	Tick    int32
-	Tickadj int32
-	Stathz  int32
-	Profhz  int32
+	Hz     int32
+	Tick   int32
+	Stathz int32
+	Profhz int32
 }
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
index 9ecda691..ac5c8b63 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -558,12 +558,11 @@ type Uvmexp struct {
 	Kmapent            int32
 }
 
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
 
 type Clockinfo struct {
-	Hz      int32
-	Tick    int32
-	Tickadj int32
-	Stathz  int32
-	Profhz  int32
+	Hz     int32
+	Tick   int32
+	Stathz int32
+	Profhz int32
 }
diff --git a/vendor/golang.org/x/sys/windows/aliases.go b/vendor/golang.org/x/sys/windows/aliases.go
index af3af60d..a20ebea6 100644
--- a/vendor/golang.org/x/sys/windows/aliases.go
+++ b/vendor/golang.org/x/sys/windows/aliases.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build windows
-// +build go1.9
+//go:build windows && go1.9
+// +build windows,go1.9
 
 package windows
 
diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go
index 40af946e..2cd60645 100644
--- a/vendor/golang.org/x/sys/windows/eventlog.go
+++ b/vendor/golang.org/x/sys/windows/eventlog.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows
 // +build windows
 
 package windows
diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go
index 328e3b2a..61029109 100644
--- a/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build generate
 // +build generate
 
 package windows
diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go
index a74e3e24..9196b089 100644
--- a/vendor/golang.org/x/sys/windows/race.go
+++ b/vendor/golang.org/x/sys/windows/race.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows && race
 // +build windows,race
 
 package windows
diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go
index e44a3cbf..7bae4817 100644
--- a/vendor/golang.org/x/sys/windows/race0.go
+++ b/vendor/golang.org/x/sys/windows/race0.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows && !race
 // +build windows,!race
 
 package windows
diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go
index b269850d..f8deca83 100644
--- a/vendor/golang.org/x/sys/windows/service.go
+++ b/vendor/golang.org/x/sys/windows/service.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows
 // +build windows
 
 package windows
@@ -16,8 +17,6 @@ const (
 	SC_MANAGER_ALL_ACCESS         = 0xf003f
 )
 
-//sys	OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
-
 const (
 	SERVICE_KERNEL_DRIVER       = 1
 	SERVICE_FILE_SYSTEM_DRIVER  = 2
@@ -132,6 +131,14 @@ const (
 	SC_EVENT_DATABASE_CHANGE = 0
 	SC_EVENT_PROPERTY_CHANGE = 1
 	SC_EVENT_STATUS_CHANGE   = 2
+
+	SERVICE_START_REASON_DEMAND             = 0x00000001
+	SERVICE_START_REASON_AUTO               = 0x00000002
+	SERVICE_START_REASON_TRIGGER            = 0x00000004
+	SERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008
+	SERVICE_START_REASON_DELAYEDAUTO        = 0x00000010
+
+	SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
 )
 
 type SERVICE_STATUS struct {
@@ -216,6 +223,7 @@ type QUERY_SERVICE_LOCK_STATUS struct {
 	LockDuration uint32
 }
 
+//sys	OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
 //sys	CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle
 //sys	CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW
 //sys	OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW
@@ -235,3 +243,5 @@ type QUERY_SERVICE_LOCK_STATUS struct {
 //sys	NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
 //sys	SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
 //sys	UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
+//sys	RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
+//sys	QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go
index 917cc2aa..4fc01434 100644
--- a/vendor/golang.org/x/sys/windows/str.go
+++ b/vendor/golang.org/x/sys/windows/str.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows
 // +build windows
 
 package windows
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index 6122f557..72074d58 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build windows
 // +build windows
 
 // Package windows contains an interface to the low-level operating system
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index d3b59ae6..2ff6aa04 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -401,6 +401,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys	LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
 //sys	LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
 
+// Version APIs
+//sys	GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
+//sys	GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
+//sys	VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
+
 // Process Status API (PSAPI)
 //sys	EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
 //sys	EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
@@ -418,11 +423,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
 //sys	RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
 //sys	NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
 //sys	NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys	NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
 //sys	RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
 //sys	RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
 //sys	RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
 //sys	NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
 //sys	NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
+//sys	NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
+//sys	NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
+//sys	RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
+//sys	RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
 
 // syscall interface implementation for other packages
 
@@ -883,9 +893,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {
 	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
 }
 
@@ -905,9 +913,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
 	p[0] = byte(sa.Port >> 8)
 	p[1] = byte(sa.Port)
 	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
+	sa.raw.Addr = sa.Addr
 	return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
 }
 
@@ -980,9 +986,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
 		sa := new(SockaddrInet4)
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 
 	case AF_INET6:
@@ -991,9 +995,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
 		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
 		sa.Port = int(p[0])<<8 + int(p[1])
 		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
+		sa.Addr = pp.Addr
 		return sa, nil
 	}
 	return nil, syscall.EAFNOSUPPORT
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 02db2ee5..286dd1ea 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -2366,6 +2366,12 @@ type LIST_ENTRY struct {
 	Blink *LIST_ENTRY
 }
 
+type RUNTIME_FUNCTION struct {
+	BeginAddress uint32
+	EndAddress   uint32
+	UnwindData   uint32
+}
+
 type LDR_DATA_TABLE_ENTRY struct {
 	reserved1          [2]uintptr
 	InMemoryOrderLinks LIST_ENTRY
@@ -2556,6 +2562,60 @@ const (
 	FILE_PIPE_SERVER_END = 0x00000001
 )
 
+const (
+	// FileInformationClass for NtSetInformationFile
+	FileBasicInformation                         = 4
+	FileRenameInformation                        = 10
+	FileDispositionInformation                   = 13
+	FilePositionInformation                      = 14
+	FileEndOfFileInformation                     = 20
+	FileValidDataLengthInformation               = 39
+	FileShortNameInformation                     = 40
+	FileIoPriorityHintInformation                = 43
+	FileReplaceCompletionInformation             = 61
+	FileDispositionInformationEx                 = 64
+	FileCaseSensitiveInformation                 = 71
+	FileLinkInformation                          = 72
+	FileCaseSensitiveInformationForceAccessCheck = 75
+	FileKnownFolderInformation                   = 76
+
+	// Flags for FILE_RENAME_INFORMATION
+	FILE_RENAME_REPLACE_IF_EXISTS                    = 0x00000001
+	FILE_RENAME_POSIX_SEMANTICS                      = 0x00000002
+	FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE       = 0x00000004
+	FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+	FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE          = 0x00000010
+	FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE          = 0x00000020
+	FILE_RENAME_PRESERVE_AVAILABLE_SPACE             = 0x00000030
+	FILE_RENAME_IGNORE_READONLY_ATTRIBUTE            = 0x00000040
+	FILE_RENAME_FORCE_RESIZE_TARGET_SR               = 0x00000080
+	FILE_RENAME_FORCE_RESIZE_SOURCE_SR               = 0x00000100
+	FILE_RENAME_FORCE_RESIZE_SR                      = 0x00000180
+
+	// Flags for FILE_DISPOSITION_INFORMATION_EX
+	FILE_DISPOSITION_DO_NOT_DELETE             = 0x00000000
+	FILE_DISPOSITION_DELETE                    = 0x00000001
+	FILE_DISPOSITION_POSIX_SEMANTICS           = 0x00000002
+	FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004
+	FILE_DISPOSITION_ON_CLOSE                  = 0x00000008
+	FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010
+
+	// Flags for FILE_CASE_SENSITIVE_INFORMATION
+	FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001
+
+	// Flags for FILE_LINK_INFORMATION
+	FILE_LINK_REPLACE_IF_EXISTS                    = 0x00000001
+	FILE_LINK_POSIX_SEMANTICS                      = 0x00000002
+	FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+	FILE_LINK_NO_INCREASE_AVAILABLE_SPACE          = 0x00000010
+	FILE_LINK_NO_DECREASE_AVAILABLE_SPACE          = 0x00000020
+	FILE_LINK_PRESERVE_AVAILABLE_SPACE             = 0x00000030
+	FILE_LINK_IGNORE_READONLY_ATTRIBUTE            = 0x00000040
+	FILE_LINK_FORCE_RESIZE_TARGET_SR               = 0x00000080
+	FILE_LINK_FORCE_RESIZE_SOURCE_SR               = 0x00000100
+	FILE_LINK_FORCE_RESIZE_SR                      = 0x00000180
+)
+
 // ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
 const (
 	ProcessBasicInformation = iota
@@ -2672,6 +2732,203 @@ type PROCESS_BASIC_INFORMATION struct {
 	InheritedFromUniqueProcessId uintptr
 }
 
+// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
+const (
+	SystemBasicInformation = iota
+	SystemProcessorInformation
+	SystemPerformanceInformation
+	SystemTimeOfDayInformation
+	SystemPathInformation
+	SystemProcessInformation
+	SystemCallCountInformation
+	SystemDeviceInformation
+	SystemProcessorPerformanceInformation
+	SystemFlagsInformation
+	SystemCallTimeInformation
+	SystemModuleInformation
+	SystemLocksInformation
+	SystemStackTraceInformation
+	SystemPagedPoolInformation
+	SystemNonPagedPoolInformation
+	SystemHandleInformation
+	SystemObjectInformation
+	SystemPageFileInformation
+	SystemVdmInstemulInformation
+	SystemVdmBopInformation
+	SystemFileCacheInformation
+	SystemPoolTagInformation
+	SystemInterruptInformation
+	SystemDpcBehaviorInformation
+	SystemFullMemoryInformation
+	SystemLoadGdiDriverInformation
+	SystemUnloadGdiDriverInformation
+	SystemTimeAdjustmentInformation
+	SystemSummaryMemoryInformation
+	SystemMirrorMemoryInformation
+	SystemPerformanceTraceInformation
+	systemObsolete0
+	SystemExceptionInformation
+	SystemCrashDumpStateInformation
+	SystemKernelDebuggerInformation
+	SystemContextSwitchInformation
+	SystemRegistryQuotaInformation
+	SystemExtendServiceTableInformation
+	SystemPrioritySeperation
+	SystemVerifierAddDriverInformation
+	SystemVerifierRemoveDriverInformation
+	SystemProcessorIdleInformation
+	SystemLegacyDriverInformation
+	SystemCurrentTimeZoneInformation
+	SystemLookasideInformation
+	SystemTimeSlipNotification
+	SystemSessionCreate
+	SystemSessionDetach
+	SystemSessionInformation
+	SystemRangeStartInformation
+	SystemVerifierInformation
+	SystemVerifierThunkExtend
+	SystemSessionProcessInformation
+	SystemLoadGdiDriverInSystemSpace
+	SystemNumaProcessorMap
+	SystemPrefetcherInformation
+	SystemExtendedProcessInformation
+	SystemRecommendedSharedDataAlignment
+	SystemComPlusPackage
+	SystemNumaAvailableMemory
+	SystemProcessorPowerInformation
+	SystemEmulationBasicInformation
+	SystemEmulationProcessorInformation
+	SystemExtendedHandleInformation
+	SystemLostDelayedWriteInformation
+	SystemBigPoolInformation
+	SystemSessionPoolTagInformation
+	SystemSessionMappedViewInformation
+	SystemHotpatchInformation
+	SystemObjectSecurityMode
+	SystemWatchdogTimerHandler
+	SystemWatchdogTimerInformation
+	SystemLogicalProcessorInformation
+	SystemWow64SharedInformationObsolete
+	SystemRegisterFirmwareTableInformationHandler
+	SystemFirmwareTableInformation
+	SystemModuleInformationEx
+	SystemVerifierTriageInformation
+	SystemSuperfetchInformation
+	SystemMemoryListInformation
+	SystemFileCacheInformationEx
+	SystemThreadPriorityClientIdInformation
+	SystemProcessorIdleCycleTimeInformation
+	SystemVerifierCancellationInformation
+	SystemProcessorPowerInformationEx
+	SystemRefTraceInformation
+	SystemSpecialPoolInformation
+	SystemProcessIdInformation
+	SystemErrorPortInformation
+	SystemBootEnvironmentInformation
+	SystemHypervisorInformation
+	SystemVerifierInformationEx
+	SystemTimeZoneInformation
+	SystemImageFileExecutionOptionsInformation
+	SystemCoverageInformation
+	SystemPrefetchPatchInformation
+	SystemVerifierFaultsInformation
+	SystemSystemPartitionInformation
+	SystemSystemDiskInformation
+	SystemProcessorPerformanceDistribution
+	SystemNumaProximityNodeInformation
+	SystemDynamicTimeZoneInformation
+	SystemCodeIntegrityInformation
+	SystemProcessorMicrocodeUpdateInformation
+	SystemProcessorBrandString
+	SystemVirtualAddressInformation
+	SystemLogicalProcessorAndGroupInformation
+	SystemProcessorCycleTimeInformation
+	SystemStoreInformation
+	SystemRegistryAppendString
+	SystemAitSamplingValue
+	SystemVhdBootInformation
+	SystemCpuQuotaInformation
+	SystemNativeBasicInformation
+	systemSpare1
+	SystemLowPriorityIoInformation
+	SystemTpmBootEntropyInformation
+	SystemVerifierCountersInformation
+	SystemPagedPoolInformationEx
+	SystemSystemPtesInformationEx
+	SystemNodeDistanceInformation
+	SystemAcpiAuditInformation
+	SystemBasicPerformanceInformation
+	SystemQueryPerformanceCounterInformation
+	SystemSessionBigPoolInformation
+	SystemBootGraphicsInformation
+	SystemScrubPhysicalMemoryInformation
+	SystemBadPageInformation
+	SystemProcessorProfileControlArea
+	SystemCombinePhysicalMemoryInformation
+	SystemEntropyInterruptTimingCallback
+	SystemConsoleInformation
+	SystemPlatformBinaryInformation
+	SystemThrottleNotificationInformation
+	SystemHypervisorProcessorCountInformation
+	SystemDeviceDataInformation
+	SystemDeviceDataEnumerationInformation
+	SystemMemoryTopologyInformation
+	SystemMemoryChannelInformation
+	SystemBootLogoInformation
+	SystemProcessorPerformanceInformationEx
+	systemSpare0
+	SystemSecureBootPolicyInformation
+	SystemPageFileInformationEx
+	SystemSecureBootInformation
+	SystemEntropyInterruptTimingRawInformation
+	SystemPortableWorkspaceEfiLauncherInformation
+	SystemFullProcessInformation
+	SystemKernelDebuggerInformationEx
+	SystemBootMetadataInformation
+	SystemSoftRebootInformation
+	SystemElamCertificateInformation
+	SystemOfflineDumpConfigInformation
+	SystemProcessorFeaturesInformation
+	SystemRegistryReconciliationInformation
+	SystemEdidInformation
+	SystemManufacturingInformation
+	SystemEnergyEstimationConfigInformation
+	SystemHypervisorDetailInformation
+	SystemProcessorCycleStatsInformation
+	SystemVmGenerationCountInformation
+	SystemTrustedPlatformModuleInformation
+	SystemKernelDebuggerFlags
+	SystemCodeIntegrityPolicyInformation
+	SystemIsolatedUserModeInformation
+	SystemHardwareSecurityTestInterfaceResultsInformation
+	SystemSingleModuleInformation
+	SystemAllowedCpuSetsInformation
+	SystemDmaProtectionInformation
+	SystemInterruptCpuSetsInformation
+	SystemSecureBootPolicyFullInformation
+	SystemCodeIntegrityPolicyFullInformation
+	SystemAffinitizedInterruptProcessorInformation
+	SystemRootSiloInformation
+)
+
+type RTL_PROCESS_MODULE_INFORMATION struct {
+	Section          Handle
+	MappedBase       uintptr
+	ImageBase        uintptr
+	ImageSize        uint32
+	Flags            uint32
+	LoadOrderIndex   uint16
+	InitOrderIndex   uint16
+	LoadCount        uint16
+	OffsetToFileName uint16
+	FullPathName     [256]byte
+}
+
+type RTL_PROCESS_MODULES struct {
+	NumberOfModules uint32
+	Modules         [1]RTL_PROCESS_MODULE_INFORMATION
+}
+
 // Constants for LocalAlloc flags.
 const (
 	LMEM_FIXED          = 0x0
@@ -2766,6 +3023,22 @@ var (
 	RT_MANIFEST     ResourceID = 24
 )
 
+type VS_FIXEDFILEINFO struct {
+	Signature        uint32
+	StrucVersion     uint32
+	FileVersionMS    uint32
+	FileVersionLS    uint32
+	ProductVersionMS uint32
+	ProductVersionLS uint32
+	FileFlagsMask    uint32
+	FileFlags        uint32
+	FileOS           uint32
+	FileType         uint32
+	FileSubtype      uint32
+	FileDateMS       uint32
+	FileDateLS       uint32
+}
+
 type COAUTHIDENTITY struct {
 	User           *uint16
 	UserLength     uint32
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 4ea788e4..91817d6d 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -51,6 +51,7 @@ var (
 	modshell32  = NewLazySystemDLL("shell32.dll")
 	moduser32   = NewLazySystemDLL("user32.dll")
 	moduserenv  = NewLazySystemDLL("userenv.dll")
+	modversion  = NewLazySystemDLL("version.dll")
 	modwintrust = NewLazySystemDLL("wintrust.dll")
 	modws2_32   = NewLazySystemDLL("ws2_32.dll")
 	modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
@@ -114,6 +115,7 @@ var (
 	procOpenThreadToken                                      = modadvapi32.NewProc("OpenThreadToken")
 	procQueryServiceConfig2W                                 = modadvapi32.NewProc("QueryServiceConfig2W")
 	procQueryServiceConfigW                                  = modadvapi32.NewProc("QueryServiceConfigW")
+	procQueryServiceDynamicInformation                       = modadvapi32.NewProc("QueryServiceDynamicInformation")
 	procQueryServiceLockStatusW                              = modadvapi32.NewProc("QueryServiceLockStatusW")
 	procQueryServiceStatus                                   = modadvapi32.NewProc("QueryServiceStatus")
 	procQueryServiceStatusEx                                 = modadvapi32.NewProc("QueryServiceStatusEx")
@@ -124,6 +126,7 @@ var (
 	procRegQueryInfoKeyW                                     = modadvapi32.NewProc("RegQueryInfoKeyW")
 	procRegQueryValueExW                                     = modadvapi32.NewProc("RegQueryValueExW")
 	procRegisterEventSourceW                                 = modadvapi32.NewProc("RegisterEventSourceW")
+	procRegisterServiceCtrlHandlerExW                        = modadvapi32.NewProc("RegisterServiceCtrlHandlerExW")
 	procReportEventW                                         = modadvapi32.NewProc("ReportEventW")
 	procRevertToSelf                                         = modadvapi32.NewProc("RevertToSelf")
 	procSetEntriesInAclW                                     = modadvapi32.NewProc("SetEntriesInAclW")
@@ -365,8 +368,13 @@ var (
 	procNtCreateFile                                         = modntdll.NewProc("NtCreateFile")
 	procNtCreateNamedPipeFile                                = modntdll.NewProc("NtCreateNamedPipeFile")
 	procNtQueryInformationProcess                            = modntdll.NewProc("NtQueryInformationProcess")
+	procNtQuerySystemInformation                             = modntdll.NewProc("NtQuerySystemInformation")
+	procNtSetInformationFile                                 = modntdll.NewProc("NtSetInformationFile")
 	procNtSetInformationProcess                              = modntdll.NewProc("NtSetInformationProcess")
+	procNtSetSystemInformation                               = modntdll.NewProc("NtSetSystemInformation")
+	procRtlAddFunctionTable                                  = modntdll.NewProc("RtlAddFunctionTable")
 	procRtlDefaultNpAcl                                      = modntdll.NewProc("RtlDefaultNpAcl")
+	procRtlDeleteFunctionTable                               = modntdll.NewProc("RtlDeleteFunctionTable")
 	procRtlDosPathNameToNtPathName_U_WithStatus              = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus")
 	procRtlDosPathNameToRelativeNtPathName_U_WithStatus      = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus")
 	procRtlGetCurrentPeb                                     = modntdll.NewProc("RtlGetCurrentPeb")
@@ -402,6 +410,9 @@ var (
 	procCreateEnvironmentBlock                               = moduserenv.NewProc("CreateEnvironmentBlock")
 	procDestroyEnvironmentBlock                              = moduserenv.NewProc("DestroyEnvironmentBlock")
 	procGetUserProfileDirectoryW                             = moduserenv.NewProc("GetUserProfileDirectoryW")
+	procGetFileVersionInfoSizeW                              = modversion.NewProc("GetFileVersionInfoSizeW")
+	procGetFileVersionInfoW                                  = modversion.NewProc("GetFileVersionInfoW")
+	procVerQueryValueW                                       = modversion.NewProc("VerQueryValueW")
 	procWinVerifyTrustEx                                     = modwintrust.NewProc("WinVerifyTrustEx")
 	procFreeAddrInfoW                                        = modws2_32.NewProc("FreeAddrInfoW")
 	procGetAddrInfoW                                         = modws2_32.NewProc("GetAddrInfoW")
@@ -966,6 +977,18 @@ func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, buf
 	return
 }
 
+func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) {
+	err = procQueryServiceDynamicInformation.Find()
+	if err != nil {
+		return
+	}
+	r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
+	if r1 == 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
 func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
 	r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
 	if r1 == 0 {
@@ -1055,6 +1078,15 @@ func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Hand
 	return
 }
 
+func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
+	r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
+	handle = Handle(r0)
+	if handle == 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
 func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
 	r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
 	if r1 == 0 {
@@ -3160,6 +3192,22 @@ func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe
 	return
 }
 
+func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
+	r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0)
+	if r0 != 0 {
+		ntstatus = NTStatus(r0)
+	}
+	return
+}
+
+func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
+	r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0)
+	if r0 != 0 {
+		ntstatus = NTStatus(r0)
+	}
+	return
+}
+
 func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
 	r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
 	if r0 != 0 {
@@ -3168,6 +3216,20 @@ func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.P
 	return
 }
 
+func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
+	r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
+	if r0 != 0 {
+		ntstatus = NTStatus(r0)
+	}
+	return
+}
+
+func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
+	r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
+	ret = r0 != 0
+	return
+}
+
 func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
 	r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
 	if r0 != 0 {
@@ -3176,6 +3238,12 @@ func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
 	return
 }
 
+func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
+	r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0)
+	ret = r0 != 0
+	return
+}
+
 func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
 	r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
 	if r0 != 0 {
@@ -3449,6 +3517,58 @@ func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
 	return
 }
 
+func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) {
+	var _p0 *uint16
+	_p0, err = syscall.UTF16PtrFromString(filename)
+	if err != nil {
+		return
+	}
+	return _GetFileVersionInfoSize(_p0, zeroHandle)
+}
+
+func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
+	r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0)
+	bufSize = uint32(r0)
+	if bufSize == 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
+	var _p0 *uint16
+	_p0, err = syscall.UTF16PtrFromString(filename)
+	if err != nil {
+		return
+	}
+	return _GetFileVersionInfo(_p0, handle, bufSize, buffer)
+}
+
+func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
+	r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0)
+	if r1 == 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
+	var _p0 *uint16
+	_p0, err = syscall.UTF16PtrFromString(subBlock)
+	if err != nil {
+		return
+	}
+	return _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize)
+}
+
+func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
+	r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+	if r1 == 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
 func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
 	r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
 	if r0 != 0 {
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 0c595f43..c1ffd693 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -36,7 +36,7 @@ github.com/mattn/go-colorable
 github.com/mattn/go-isatty
 # github.com/mattn/go-runewidth v0.0.3
 github.com/mattn/go-runewidth
-# github.com/peterh/liner v1.2.1
+# github.com/peterh/liner v1.2.2
 ## explicit
 github.com/peterh/liner
 # github.com/russross/blackfriday/v2 v2.0.1
@@ -67,7 +67,7 @@ golang.org/x/arch/arm64/arm64asm
 golang.org/x/arch/x86/x86asm
 # golang.org/x/mod v0.5.1
 golang.org/x/mod/semver
-# golang.org/x/sys v0.0.0-20211019181941-9d821ace8654
+# golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1
 ## explicit
 golang.org/x/sys/execabs
 golang.org/x/sys/internal/unsafeheader


Test patch:
diff --git a/Documentation/usage/dlv_test.md b/Documentation/usage/dlv_test.md
index 2d8526f0..9da84116 100644
--- a/Documentation/usage/dlv_test.md
+++ b/Documentation/usage/dlv_test.md
@@ -29,14 +29,14 @@ dlv test [package] [flags]
 ### Options inherited from parent commands
 
 ```
-      --accept-multiclient               Allows a headless server to accept multiple client connections.
+      --accept-multiclient               Allows a headless server to accept multiple client connections via JSON-RPC or DAP.
       --allow-non-terminal-interactive   Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr
-      --api-version int                  Selects API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
+      --api-version int                  Selects JSON-RPC API version when headless. New clients should use v2. Can be reset via RPCServer.SetApiVersion. See Documentation/api/json-rpc/README.md. (default 1)
       --backend string                   Backend selection (see 'dlv help backend'). (default "default")
       --build-flags string               Build flags, to be passed to the compiler. For example: --build-flags="-tags=integration -mod=vendor -cover -v"
       --check-go-version                 Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve. (default true)
       --disable-aslr                     Disables address space randomization
-      --headless                         Run debug server only, in headless mode.
+      --headless                         Run debug server only, in headless mode. Server will accept both JSON-RPC or DAP client connections.
       --init string                      Init file, executed by the terminal client.
   -l, --listen string                    Debugging server listen address. (default "127.0.0.1:0")
       --log                              Enable debugging server logging.
diff --git a/_fixtures/testenv.go b/_fixtures/testenv.go
index fdd55ea5..98cf58b8 100644
--- a/_fixtures/testenv.go
+++ b/_fixtures/testenv.go
@@ -7,7 +7,7 @@ import (
 )
 
 func main() {
-	x := os.Getenv("SOMEVAR")
+	x, y := os.LookupEnv("SOMEVAR")
 	runtime.Breakpoint()
-	fmt.Printf("SOMEVAR=%s\n", x)
+	fmt.Printf("SOMEVAR=%s\n%v", x, y)
 }
diff --git a/cmd/dlv/dlv_test.go b/cmd/dlv/dlv_test.go
index eb1f0b6e..54699890 100644
--- a/cmd/dlv/dlv_test.go
+++ b/cmd/dlv/dlv_test.go
@@ -962,7 +962,7 @@ func TestTracePid(t *testing.T) {
 	dlvbin, tmpdir := getDlvBin(t)
 	defer os.RemoveAll(tmpdir)
 
-	expected := []byte("goroutine(1): main.A() => ()\n")
+	expected := []byte("goroutine(1): main.A()\n => ()\n")
 
 	// make process run
 	fix := protest.BuildFixture("issue2023", 0)
diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go
index e7acf601..4b6825ba 100644
--- a/pkg/proc/proc_test.go
+++ b/pkg/proc/proc_test.go
@@ -1679,7 +1679,7 @@ func TestCondBreakpoint(t *testing.T) {
 
 		n, _ := constant.Int64Val(nvar.Value)
 		if n != 7 {
-			t.Fatalf("Stoppend on wrong goroutine %d\n", n)
+			t.Fatalf("Stopped on wrong goroutine %d\n", n)
 		}
 	})
 }
@@ -1720,7 +1720,7 @@ func TestCondBreakpointError(t *testing.T) {
 
 			n, _ := constant.Int64Val(nvar.Value)
 			if n != 7 {
-				t.Fatalf("Stoppend on wrong goroutine %d\n", n)
+				t.Fatalf("Stopped on wrong goroutine %d\n", n)
 			}
 		}
 	})
@@ -1739,7 +1739,7 @@ func TestHitCondBreakpointEQ(t *testing.T) {
 
 		i, _ := constant.Int64Val(ivar.Value)
 		if i != 3 {
-			t.Fatalf("Stoppend on wrong hitcount %d\n", i)
+			t.Fatalf("Stopped on wrong hitcount %d\n", i)
 		}
 
 		err := p.Continue()
@@ -1764,7 +1764,7 @@ func TestHitCondBreakpointGEQ(t *testing.T) {
 
 			i, _ := constant.Int64Val(ivar.Value)
 			if int(i) != it {
-				t.Fatalf("Stoppend on wrong hitcount %d\n", i)
+				t.Fatalf("Stopped on wrong hitcount %d\n", i)
 			}
 		}
 
@@ -1787,7 +1787,7 @@ func TestHitCondBreakpointREM(t *testing.T) {
 
 			i, _ := constant.Int64Val(ivar.Value)
 			if int(i) != it {
-				t.Fatalf("Stoppend on wrong hitcount %d\n", i)
+				t.Fatalf("Stopped on wrong hitcount %d\n", i)
 			}
 		}
 
@@ -3979,6 +3979,9 @@ func TestInlineBreakpoint(t *testing.T) {
 	}
 	withTestProcessArgs("testinline", t, ".", []string{}, protest.EnableInlining|protest.EnableOptimization, func(p *proc.Target, fixture protest.Fixture) {
 		pcs, err := proc.FindFileLocation(p, fixture.Source, 17)
+		if err != nil {
+			t.Fatal(err)
+		}
 		t.Logf("%#v\n", pcs)
 		if len(pcs) != 1 {
 			t.Fatalf("unable to get PC for inlined function call: %v", pcs)
@@ -3995,6 +3998,27 @@ func TestInlineBreakpoint(t *testing.T) {
 	})
 }
 
+func TestDoubleInlineBreakpoint(t *testing.T) {
+	// We should be able to set a breakpoint on an inlined function that
+	// has been inlined within an inlined function.
+	if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 10, Rev: -1}) {
+		// Versions of go before 1.10 do not have DWARF information for inlined calls
+		t.Skip("inlining not supported")
+	}
+	withTestProcessArgs("doubleinline", t, ".", []string{}, protest.EnableInlining|protest.EnableOptimization, func(p *proc.Target, fixture protest.Fixture) {
+		fns, err := p.BinInfo().FindFunction("main.(*Rectangle).Height")
+		if err != nil {
+			t.Fatal(err)
+		}
+		if len(fns) != 1 {
+			t.Fatalf("expected one function for Height, got %d", len(fns))
+		}
+		if len(fns[0].InlinedCalls) != 1 {
+			t.Fatalf("expected one inlined call for Height, got %d", len(fns[0].InlinedCalls))
+		}
+	})
+}
+
 func TestIssue951(t *testing.T) {
 	if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{Major: 1, Minor: 9, Rev: -1}) {
 		t.Skip("scopes not implemented in <=go1.8")
diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go
index 9a6429fe..584ad072 100644
--- a/pkg/terminal/command_test.go
+++ b/pkg/terminal/command_test.go
@@ -1,6 +1,7 @@
 package terminal
 
 import (
+	"bytes"
 	"flag"
 	"fmt"
 	"io/ioutil"
@@ -52,52 +53,28 @@ type FakeTerminal struct {
 const logCommandOutput = false
 
 func (ft *FakeTerminal) Exec(cmdstr string) (outstr string, err error) {
-	outfh, err := ioutil.TempFile("", "cmdtestout")
-	if err != nil {
-		ft.t.Fatalf("could not create temporary file: %v", err)
-	}
-
-	stdout, stderr, termstdout := os.Stdout, os.Stderr, ft.Term.stdout
-	os.Stdout, os.Stderr, ft.Term.stdout = outfh, outfh, outfh
-	defer func() {
-		os.Stdout, os.Stderr, ft.Term.stdout = stdout, stderr, termstdout
-		outfh.Close()
-		outbs, err1 := ioutil.ReadFile(outfh.Name())
-		if err1 != nil {
-			ft.t.Fatalf("could not read temporary output file: %v", err)
-		}
-		outstr = string(outbs)
-		if logCommandOutput {
-			ft.t.Logf("command %q -> %q", cmdstr, outstr)
-		}
-		os.Remove(outfh.Name())
-	}()
+	var buf bytes.Buffer
+	ft.Term.stdout.w = &buf
+	ft.Term.starlarkEnv.Redirect(ft.Term.stdout)
 	err = ft.cmds.Call(cmdstr, ft.Term)
+	outstr = buf.String()
+	if logCommandOutput {
+		ft.t.Logf("command %q -> %q", cmdstr, outstr)
+	}
+	ft.Term.stdout.Flush()
 	return
 }
 
 func (ft *FakeTerminal) ExecStarlark(starlarkProgram string) (outstr string, err error) {
-	outfh, err := ioutil.TempFile("", "cmdtestout")
-	if err != nil {
-		ft.t.Fatalf("could not create temporary file: %v", err)
-	}
-
-	stdout, stderr, termstdout := os.Stdout, os.Stderr, ft.Term.stdout
-	os.Stdout, os.Stderr, ft.Term.stdout = outfh, outfh, outfh
-	defer func() {
-		os.Stdout, os.Stderr, ft.Term.stdout = stdout, stderr, termstdout
-		outfh.Close()
-		outbs, err1 := ioutil.ReadFile(outfh.Name())
-		if err1 != nil {
-			ft.t.Fatalf("could not read temporary output file: %v", err)
-		}
-		outstr = string(outbs)
-		if logCommandOutput {
-			ft.t.Logf("command %q -> %q", starlarkProgram, outstr)
-		}
-		os.Remove(outfh.Name())
-	}()
+	var buf bytes.Buffer
+	ft.Term.stdout.w = &buf
+	ft.Term.starlarkEnv.Redirect(ft.Term.stdout)
 	_, err = ft.Term.starlarkEnv.Execute("<stdin>", starlarkProgram, "main", nil)
+	outstr = buf.String()
+	if logCommandOutput {
+		ft.t.Logf("command %q -> %q", starlarkProgram, outstr)
+	}
+	ft.Term.stdout.Flush()
 	return
 }
 
@@ -1269,3 +1246,48 @@ func TestBreakpointEditing(t *testing.T) {
 		}
 	}
 }
+
+func TestTranscript(t *testing.T) {
+	withTestTerminal("math", t, func(term *FakeTerminal) {
+		term.MustExec("break main.main")
+		out := term.MustExec("continue")
+		if !strings.HasPrefix(out, "> main.main()") {
+			t.Fatalf("Wrong output for next: <%s>", out)
+		}
+		fh, err := ioutil.TempFile("", "test-transcript-*")
+		if err != nil {
+			t.Fatalf("TempFile: %v", err)
+		}
+		name := fh.Name()
+		fh.Close()
+		t.Logf("output to %q", name)
+
+		slurp := func() string {
+			b, err := ioutil.ReadFile(name)
+			if err != nil {
+				t.Fatalf("could not read transcript file: %v", err)
+			}
+			return string(b)
+		}
+
+		term.MustExec(fmt.Sprintf("transcript %s", name))
+		out = term.MustExec("list")
+		//term.MustExec("transcript -off")
+		if out != slurp() {
+			t.Logf("output of list %s", out)
+			t.Logf("contents of transcript: %s", slurp())
+			t.Errorf("transcript and command out differ")
+		}
+
+		term.MustExec(fmt.Sprintf("transcript -t -x %s", name))
+		out = term.MustExec(`print "hello"`)
+		if out != "" {
+			t.Errorf("output of print is %q but should have been suppressed by transcript", out)
+		}
+		if slurp() != "\"hello\"\n" {
+			t.Errorf("wrong contents of transcript: %q", slurp())
+		}
+
+		os.Remove(name)
+	})
+}
diff --git a/service/dap/daptest/client.go b/service/dap/daptest/client.go
index 42a623ca..eb577025 100644
--- a/service/dap/daptest/client.go
+++ b/service/dap/daptest/client.go
@@ -150,7 +150,8 @@ const ProcessExited = `Process [0-9]+ has exited with status %s\n`
 
 func (c *Client) ExpectOutputEventProcessExited(t *testing.T, status int) *dap.OutputEvent {
 	t.Helper()
-	return c.ExpectOutputEventRegex(t, fmt.Sprintf(ProcessExited, fmt.Sprintf("%d", status)))
+	// We sometimes fail to return the correct exit status on Linux, so allow -1 here as well.
+	return c.ExpectOutputEventRegex(t, fmt.Sprintf(ProcessExited, fmt.Sprintf("(%d|-1)", status)))
 }
 
 func (c *Client) ExpectOutputEventProcessExitedAnyStatus(t *testing.T) *dap.OutputEvent {
diff --git a/service/dap/server_test.go b/service/dap/server_test.go
index e0088dfd..671b1c89 100644
--- a/service/dap/server_test.go
+++ b/service/dap/server_test.go
@@ -6,6 +6,7 @@ import (
 	"fmt"
 	"io"
 	"io/ioutil"
+	"math"
 	"math/rand"
 	"net"
 	"os"
@@ -4494,7 +4495,10 @@ func TestStepInstruction(t *testing.T) {
 					// Next instruction.
 					client.NextInstructionRequest(1)
 					client.ExpectNextResponse(t)
-					client.ExpectStoppedEvent(t)
+					se := client.ExpectStoppedEvent(t)
+					if se.Body.ThreadId != 1 || se.Body.Reason != "step" {
+						t.Errorf("\ngot  %#v\nwant ThreadId=1 Reason=\"step\"", se)
+					}
 					verifyExpectedLocation()
 					nextPC, err := getPC(t, client, 1)
 					if err != nil {
@@ -4508,7 +4512,10 @@ func TestStepInstruction(t *testing.T) {
 					pc = nextPC
 					client.StepInInstructionRequest(1)
 					client.ExpectStepInResponse(t)
-					client.ExpectStoppedEvent(t)
+					se = client.ExpectStoppedEvent(t)
+					if se.Body.ThreadId != 1 || se.Body.Reason != "step" {
+						t.Errorf("\ngot  %#v\nwant ThreadId=1 Reason=\"step\"", se)
+					}
 					verifyExpectedLocation()
 					nextPC, err = getPC(t, client, 1)
 					if err != nil {
@@ -4522,7 +4529,10 @@ func TestStepInstruction(t *testing.T) {
 					pc = nextPC
 					client.StepOutInstructionRequest(1)
 					client.ExpectStepOutResponse(t)
-					client.ExpectStoppedEvent(t)
+					se = client.ExpectStoppedEvent(t)
+					if se.Body.ThreadId != 1 || se.Body.Reason != "step" {
+						t.Errorf("\ngot  %#v\nwant ThreadId=1 Reason=\"step\"", se)
+					}
 					verifyExpectedLocation()
 					nextPC, err = getPC(t, client, 1)
 					if err != nil {
@@ -5343,11 +5353,39 @@ func TestNoDebug_AcceptNoRequestsButDisconnect(t *testing.T) {
 
 		// Disconnect request is ok
 		client.DisconnectRequestWithKillOption(true)
-		client.ExpectOutputEventTerminating(t)
-		client.ExpectOutputEventRegex(t, fmt.Sprintf(daptest.ProcessExited, "(-1|1)"))
-		client.ExpectTerminatedEvent(t)
-		client.ExpectDisconnectResponse(t)
-		client.ExpectTerminatedEvent(t)
+		terminated, disconnectResp := false, false
+		for {
+			m, err := client.ReadMessage()
+			if err != nil {
+				break
+			}
+			switch m := m.(type) {
+			case *dap.OutputEvent:
+				ok := false
+				wants := []string{`Terminating process [0-9]+\n`, fmt.Sprintf(daptest.ProcessExited, "(-1|1)")}
+				for _, want := range wants {
+					if matched, _ := regexp.MatchString(want, m.Body.Output); matched {
+						ok = true
+						break
+					}
+				}
+				if !ok {
+					t.Errorf("\ngot %#v\nwant Output=%q\n", m, wants)
+				}
+			case *dap.TerminatedEvent:
+				terminated = true
+			case *dap.DisconnectResponse:
+				disconnectResp = true
+			default:
+				t.Errorf("got unexpected message %#v", m)
+			}
+		}
+		if !terminated {
+			t.Errorf("did not get TerminatedEvent")
+		}
+		if !disconnectResp {
+			t.Errorf("did not get DisconnectResponse")
+		}
 	})
 }
 
@@ -5509,6 +5547,106 @@ func TestLaunchRequestWithBuildFlags(t *testing.T) {
 	})
 }
 
+func TestLaunchRequestWithEnv(t *testing.T) {
+	// testenv fixture will lookup SOMEVAR with
+	//   x, y := os.Lookup("SOMEVAR")
+	// before stopping at runtime.Breakpoint.
+
+	type envMap map[string]*string
+	strVar := func(s string) *string { return &s }
+
+	fixtures := protest.FindFixturesDir() // relative to current working directory.
+	testFile, _ := filepath.Abs(filepath.Join(fixtures, "testenv.go"))
+	for _, tc := range []struct {
+		name      string
+		initEnv   envMap
+		launchEnv envMap
+		wantX     string
+		wantY     bool
+	}{
+		{
+			name:    "no env",
+			initEnv: envMap{"SOMEVAR": strVar("baz")},
+			wantX:   "baz",
+			wantY:   true,
+		},
+		{
+			name:      "overwrite",
+			initEnv:   envMap{"SOMEVAR": strVar("baz")},
+			launchEnv: envMap{"SOMEVAR": strVar("bar")},
+			wantX:     "bar",
+			wantY:     true,
+		},
+		{
+			name:      "unset",
+			initEnv:   envMap{"SOMEVAR": strVar("baz")},
+			launchEnv: envMap{"SOMEVAR": nil},
+			wantX:     "",
+			wantY:     false,
+		},
+		{
+			name:      "empty value",
+			initEnv:   envMap{"SOMEVAR": strVar("baz")},
+			launchEnv: envMap{"SOMEVAR": strVar("")},
+			wantX:     "",
+			wantY:     true,
+		},
+		{
+			name:      "set",
+			launchEnv: envMap{"SOMEVAR": strVar("foo")},
+			wantX:     "foo",
+			wantY:     true,
+		},
+		{
+			name:      "untouched",
+			initEnv:   envMap{"SOMEVAR": strVar("baz")},
+			launchEnv: envMap{"SOMEVAR2": nil, "SOMEVAR3": strVar("foo")},
+			wantX:     "baz",
+			wantY:     true,
+		},
+	} {
+
+		t.Run(tc.name, func(t *testing.T) {
+			// cleanup
+			defer func() {
+				os.Unsetenv("SOMEVAR")
+				os.Unsetenv("SOMEVAR2")
+				os.Unsetenv("SOMEVAR3")
+			}()
+
+			for k, v := range tc.initEnv {
+				if v != nil {
+					os.Setenv(k, *v)
+				}
+			}
+
+			serverStopped := make(chan struct{})
+			client := startDAPServerWithClient(t, serverStopped)
+			defer client.Close()
+
+			runDebugSessionWithBPs(t, client, "launch", func() { // launch
+				client.LaunchRequestWithArgs(map[string]interface{}{
+					"mode":    "debug",
+					"program": testFile,
+					"env":     tc.launchEnv,
+				})
+			}, testFile, nil, // runtime.Breakpoint
+				[]onBreakpoint{{
+					execute: func() {
+						client.EvaluateRequest("x", 1000, "whatever")
+						gotX := client.ExpectEvaluateResponse(t)
+						checkEval(t, gotX, fmt.Sprintf("%q", tc.wantX), false)
+						client.EvaluateRequest("y", 1000, "whatever")
+						gotY := client.ExpectEvaluateResponse(t)
+						checkEval(t, gotY, fmt.Sprintf("%v", tc.wantY), false)
+					},
+					disconnect: true,
+				}})
+			<-serverStopped
+		})
+	}
+}
+
 func TestAttachRequest(t *testing.T) {
 	if runtime.GOOS == "freebsd" {
 		t.SkipNow()
@@ -6799,16 +6937,30 @@ func TestDisassemble(t *testing.T) {
 					}
 
 					// Request invalid instructions.
-					client.DisassembleRequest(invalidInstruction.Address, 0, 10)
-					dr = client.ExpectDisassembleResponse(t)
-					if len(dr.Body.Instructions) != 10 {
-						t.Errorf("\ngot %#v\nwant len(instructions) = 10", dr)
-					}
-					for i, got := range dr.Body.Instructions {
-						if !reflect.DeepEqual(got, invalidInstruction) {
-							t.Errorf("\ngot [%d]=%#v\nwant = %#v", i, got, invalidInstruction)
+					var checkInvalidInstruction = func(instructions []dap.DisassembledInstruction, count int, address uint64) {
+						if len(instructions) != count {
+							t.Errorf("\ngot %#v\nwant len(instructions) = %d", dr, count)
+						}
+						for i, got := range instructions {
+							if got.Instruction != invalidInstruction.Instruction {
+								t.Errorf("\ngot [%d].Instruction=%q\nwant = %#v", i, got.Instruction, invalidInstruction.Address)
+							}
+							addr, err := strconv.ParseUint(got.Address, 0, 64)
+							if err != nil {
+								t.Error(err)
+								continue
+							}
+							if addr != address {
+								t.Errorf("\ngot [%d].Address=%s\nwant = %#x", i, got.Address, address)
+							}
 						}
 					}
+					client.DisassembleRequest("0x0", 0, 10)
+					checkInvalidInstruction(client.ExpectDisassembleResponse(t).Body.Instructions, 10, 0)
+
+					client.DisassembleRequest(fmt.Sprintf("%#x", uint64(math.MaxUint64)), 0, 10)
+					checkInvalidInstruction(client.ExpectDisassembleResponse(t).Body.Instructions, 10, uint64(math.MaxUint64))
+
 					// Bad request, not a number.
 					client.DisassembleRequest("hello, world!", 0, 1)
 					client.ExpectErrorResponse(t)
@@ -6917,7 +7069,7 @@ func TestFindInstructions(t *testing.T) {
 		}
 	}
 	type args struct {
-		addr   int64
+		addr   uint64
 		offset int
 		count  int
 	}
@@ -6931,7 +7083,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request all",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: 0,
 				count:  100,
 			},
@@ -6942,7 +7094,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request all (with offset)",
 			args: args{
-				addr:   int64(startPC + numInstructions), // the instruction addr at numInstructions/2
+				addr:   uint64(startPC + numInstructions), // the instruction addr at numInstructions/2
 				offset: -numInstructions / 2,
 				count:  numInstructions,
 			},
@@ -6953,7 +7105,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request half (with offset)",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: 0,
 				count:  numInstructions / 2,
 			},
@@ -6964,7 +7116,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request half (with offset)",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: numInstructions / 2,
 				count:  numInstructions / 2,
 			},
@@ -6975,7 +7127,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request too many",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: 0,
 				count:  numInstructions * 2,
 			},
@@ -6986,7 +7138,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request too many with offset",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: -numInstructions,
 				count:  numInstructions * 2,
 			},
@@ -6997,7 +7149,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request out of bounds",
 			args: args{
-				addr:   int64(startPC),
+				addr:   uint64(startPC),
 				offset: -numInstructions,
 				count:  numInstructions,
 			},
@@ -7008,7 +7160,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "request out of bounds",
 			args: args{
-				addr:   int64(uint64(startPC + 2*(numInstructions-1))),
+				addr:   uint64(uint64(startPC + 2*(numInstructions-1))),
 				offset: 1,
 				count:  numInstructions,
 			},
@@ -7030,7 +7182,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "addr out of bounds (high)",
 			args: args{
-				addr:   int64(startPC + 2*(numInstructions+1)),
+				addr:   uint64(startPC + 2*(numInstructions+1)),
 				offset: -10,
 				count:  20,
 			},
@@ -7041,7 +7193,7 @@ func TestFindInstructions(t *testing.T) {
 		{
 			name: "addr not aligned",
 			args: args{
-				addr:   int64(startPC + 1),
+				addr:   uint64(startPC + 1),
 				offset: 0,
 				count:  20,
 			},
diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go
index ce386910..26fc6480 100644
--- a/service/test/integration2_test.go
+++ b/service/test/integration2_test.go
@@ -615,6 +615,121 @@ func TestClientServer_toggleAmendedBreakpoint(t *testing.T) {
 	})
 }
 
+func TestClientServer_disableHitCondLSSBreakpoint(t *testing.T) {
+	withTestClient2("break", t, func(c service.Client) {
+		fp := testProgPath(t, "break")
+		hitCondBp, err := c.CreateBreakpoint(&api.Breakpoint{
+			File:    fp,
+			Line:    7,
+			HitCond: "< 3",
+		})
+		if err != nil {
+			t.Fatalf("Unexpected error: %v", err)
+		}
+
+		state := <-c.Continue()
+		if state.Err != nil {
+			t.Fatalf("Unexpected error: %v, state: %#v", state.Err, state)
+		}
+
+		f, l := state.CurrentThread.File, state.CurrentThread.Line
+		if f != "break.go" && l != 7 {
+			t.Fatal("Program did not hit breakpoint")
+		}
+
+		ivar, err := c.EvalVariable(api.EvalScope{GoroutineID: -1}, "i", normalLoadConfig)
+		assertNoError(err, t, "EvalVariable")
+
+		t.Logf("ivar: %s", ivar.SinglelineString())
+
+		if ivar.Value != "1" {
+			t.Fatalf("Wrong variable value: %s", ivar.Value)
+		}
+
+		bp, err := c.GetBreakpoint(hitCondBp.ID)
+		assertNoError(err, t, "GetBreakpoint()")
+
+		if bp.Disabled {
+			t.Fatalf(
+				"Hit condition %s is still satisfiable but breakpoint has been disabled",
+				bp.HitCond,
+			)
+		}
+
+		state = <-c.Continue()
+		if state.Err != nil {
+			t.Fatalf("Unexpected error: %v, state: %#v", state.Err, state)
+		}
+
+		f, l = state.CurrentThread.File, state.CurrentThread.Line
+		if f != "break.go" && l != 7 {
+			t.Fatal("Program did not hit breakpoint")
+		}
+
+		ivar, err = c.EvalVariable(api.EvalScope{GoroutineID: -1}, "i", normalLoadConfig)
+		assertNoError(err, t, "EvalVariable")
+
+		t.Logf("ivar: %s", ivar.SinglelineString())
+
+		if ivar.Value != "2" {
+			t.Fatalf("Wrong variable value: %s", ivar.Value)
+		}
+
+		bp, err = c.GetBreakpoint(hitCondBp.ID)
+		assertNoError(err, t, "GetBreakpoint()")
+
+		if !bp.Disabled {
+			t.Fatalf(
+				"Hit condition %s is no more satisfiable but breakpoint has not been disabled",
+				bp.HitCond,
+			)
+		}
+	})
+}
+
+func TestClientServer_disableHitEQLCondBreakpoint(t *testing.T) {
+	withTestClient2("break", t, func(c service.Client) {
+		fp := testProgPath(t, "break")
+		hitCondBp, err := c.CreateBreakpoint(&api.Breakpoint{
+			File:    fp,
+			Line:    7,
+			HitCond: "== 3",
+		})
+		if err != nil {
+			t.Fatalf("Unexpected error: %v", err)
+		}
+
+		state := <-c.Continue()
+		if state.Err != nil {
+			t.Fatalf("Unexpected error: %v, state: %#v", state.Err, state)
+		}
+
+		f, l := state.CurrentThread.File, state.CurrentThread.Line
+		if f != "break.go" && l != 7 {
+			t.Fatal("Program did not hit breakpoint")
+		}
+
+		ivar, err := c.EvalVariable(api.EvalScope{GoroutineID: -1}, "i", normalLoadConfig)
+		assertNoError(err, t, "EvalVariable")
+
+		t.Logf("ivar: %s", ivar.SinglelineString())
+
+		if ivar.Value != "3" {
+			t.Fatalf("Wrong variable value: %s", ivar.Value)
+		}
+
+		bp, err := c.GetBreakpoint(hitCondBp.ID)
+		assertNoError(err, t, "GetBreakpoint()")
+
+		if !bp.Disabled {
+			t.Fatalf(
+				"Hit condition %s is no more satisfiable but breakpoint has not been disabled",
+				bp.HitCond,
+			)
+		}
+	})
+}
+
 func TestClientServer_switchThread(t *testing.T) {
 	protest.AllowRecording(t)
 	withTestClient2("testnextprog", t, func(c service.Client) {