Skip to content

Undo v1.23.1 #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: upstream-v1.23.1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e49eaf8
Improve coverage of record-replay backends by allowing recording.
gareth-rees Oct 13, 2021
c8900f7
Rename import paths to point to our fork.
gareth-rees Jan 13, 2022
596c644
Remove build status information from README.
dpapastamos Jul 29, 2019
469b117
Improved method for reading the G pointer on x86.
gareth-rees Jan 13, 2022
b458675
Support for Undo record/replay backend.
dpapastamos May 28, 2019
4447f41
Exclude TestCallFunction cases that fail with the Undo backend.
gareth-rees Mar 30, 2022
a5b268e
Clear stepping breakpoints on process exit.
mark-undoio Jun 6, 2023
3345915
Implement basic progress indicator support in Delve.
mark-undoio Jun 26, 2023
cd1f26d
Implement save and load of checkpoints with an Undo session file.
mark-undoio Jul 14, 2023
0b8a48b
Use O_TRUNC when writing out session state files.
mark-undoio Sep 4, 2023
9d2b3ae
Add support for v1 session files, as generated by UDB v7.0.
mark-undoio Aug 30, 2023
08b4650
Use the executable from the recording as the debuggee path.
mark-undoio Aug 31, 2023
7bb2bdf
Add additional fields to support session files from UDB v7.2.
mark-undoio Feb 7, 2024
27af084
Handle start, as well as end, of history to match rr.
mark-undoio Nov 11, 2024
928e5ca
Cope with newer udbserver serial protocol for exit notifications.
mark-undoio Nov 11, 2024
69bae63
pkg/proc/gdbserial: allow extra detail in ErrBackendUnavailable
undo-bkenward Nov 13, 2024
20b4273
Check installed Undo is new enough to work as a Delve backend
undo-bkenward Nov 13, 2024
33318b7
Update Delve to cope with our new v8.2+ installation layout.
mark-undoio Feb 21, 2025
d5bc2e2
Respect the HOME environment variable for session storage, where set.
mark-undoio Mar 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/KnownBugs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Known Bugs

- When Delve is compiled with versions of go prior to 1.7.0 it is not possible to set a breakpoint on a function in a remote package using the `Receiver.MethodName` syntax. See [Issue #528](https://github.com/go-delve/delve/issues/528).
- When Delve is compiled with versions of go prior to 1.7.0 it is not possible to set a breakpoint on a function in a remote package using the `Receiver.MethodName` syntax. See [Issue #528](https://github.com/undoio/delve/issues/528).
- When running Delve on binaries compiled with a version of go prior to 1.9.0 `locals` will print all local variables, including ones that are out of scope, the shadowed flag will be applied arbitrarily. If there are multiple variables defined with the same name in the current function `print` will not be able to select the correct one for the current line.
- `reverse step` will not reverse step into functions called by deferred calls.
8 changes: 4 additions & 4 deletions Documentation/api/ClientHowto.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Command line arguments that should be handed to the inferior process should be s
dlv exec --headless ./somebinary -- these arguments are for the inferior process
```

Specifying a static port number, like in the [README](//github.com/go-delve/delve/tree/master/Documentation/README.md) example, can be done using `--listen=127.0.0.1:portnumber`.
Specifying a static port number, like in the [README](//github.com/undoio/delve/tree/master/Documentation/README.md) example, can be done using `--listen=127.0.0.1:portnumber`.

This will, however, cause problems if you actually spawn multiple instances of the debugger.

Expand All @@ -43,7 +43,7 @@ The methods of a `service/rpc2.RPCServer` are exposed through this connection, t

### Example

Let's say you are trying to create a breakpoint. By looking at [Go Reference](https://pkg.go.dev/github.com/go-delve/delve/service/rpc2#RPCServer) you'll find that there is a `CreateBreakpoint` method in `RPCServer`.
Let's say you are trying to create a breakpoint. By looking at [Go Reference](https://pkg.go.dev/github.com/undoio/delve/service/rpc2#RPCServer) you'll find that there is a `CreateBreakpoint` method in `RPCServer`.

This method, like all other methods of RPCServer that you can call through the API, has two arguments: `args` and `out`: `args` contains all the input arguments of `CreateBreakpoint`, while `out` is what `CreateBreakpoint` will return to you.

Expand Down Expand Up @@ -190,7 +190,7 @@ If you want to let your users specify a breakpoint on a function selected
from a list of all functions you should specify the name of the function in
the FunctionName field of Breakpoint.

If you want to support the [same language as dlv's break and trace commands](//github.com/go-delve/delve/tree/master/Documentation/cli/locspec.md)
If you want to support the [same language as dlv's break and trace commands](//github.com/undoio/delve/tree/master/Documentation/cli/locspec.md)
you should call RPCServer.FindLocation and
then use the returned slice of Location objects to create Breakpoints to
pass to CreateBreakpoint: just fill each Breakpoint.Addr with the
Expand Down Expand Up @@ -244,7 +244,7 @@ are interested in the topmost stack frame of the current goroutine (or
thread) use: `EvalScope{ GoroutineID: -1, Frame: 0 }`.

More information on the expression language interpreted by RPCServer.Eval
can be found [here](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md).
can be found [here](//github.com/undoio/delve/tree/master/Documentation/cli/expr.md).

### Variable shadowing

Expand Down
11 changes: 5 additions & 6 deletions Documentation/api/dap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ detailed [debugging documentation](https://github.com/golang/vscode-go/blob/mast

[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.
See [dap.Server.handleRequest](https://github.com/undoio/delve/search?q=handleRequest) and capabilities set in [dap.Server.onInitializeRequest](https://github.com/undoio/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:

<table border=1>
<tr><th>request<th>mode<th>required<th colspan=9>optional<th></tr>
<tr><td rowspan=5>launch<br><a href="https://pkg.go.dev/github.com/go-delve/delve/service/dap#LaunchConfig">godoc</a>
<tr><td rowspan=5>launch<br><a href="https://pkg.go.dev/github.com/undoio/delve/service/dap#LaunchConfig">godoc</a>
<td>debug<td>program <td>dlvCwd<td>env<td>backend<td>args<td>cwd<td>buildFlags<td>output<td>noDebug
<td rowspan=7>
substitutePath<br>
Expand All @@ -45,13 +45,12 @@ In addition to the general [DAP spec](https://microsoft.github.io/debug-adapter-
<td>core<td>program<br>corefilePath<td>dlvCwd<td>env<td> <td> <td> <td> <td> <td> </tr>
<tr>
<td>replay<td>traceDirPath <td>dlvCwd<td>env<td> <td> <td> <td> <td> <td> </tr>
<tr><td rowspan=2>attach<br><a href="https://pkg.go.dev/github.com/go-delve/delve/service/dap#AttachConfig">godoc</a>
<tr><td rowspan=2>attach<br><a href="https://pkg.go.dev/github.com/undoio/delve/service/dap#AttachConfig">godoc</a>
<td>local<td>processId <td> <td> <td>backend<td> <td> <td> <td> <td> </tr>
<tr>
<td>remote<td> <td> <td> <td> <td> <td> <td> <td> <td> </tr>
</table>


Not all of the configurations are supported by each of the two available DAP servers:

<table border=1>
Expand All @@ -66,7 +65,7 @@ Not all of the configurations are supported by each of the two available DAP ser
</tr>
<tr>
<td>attach<td>"remote"<td>NOT supported<td>supported<td>Tells the `dlv --headless` server that it is expected to already be debugging a target specified as part of its command-line invocation.
<td>The client would expect `host:port` specification of an external (a.k.a. remote) server that the user already started with target <a href="https://github.com/go-delve/delve/blob/master/Documentation/usage/README.md">command and args</a>.
<td>The client would expect `host:port` specification of an external (a.k.a. remote) server that the user already started with target <a href="https://github.com/undoio/delve/blob/master/Documentation/usage/README.md">command and args</a>.
</tr>
</table>

Expand Down Expand Up @@ -144,4 +143,4 @@ 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
--->
--->
4 changes: 2 additions & 2 deletions Documentation/api/json-rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Note that this JSON-RPC interface is served over a streaming socket, *not* over
# API versions

Delve currently supports two versions of its API. By default a headless instance of `dlv` will serve APIv1 for backward compatibility with old clients, however new clients should use APIv2 as new features will only be made available through version 2. To select APIv2 use `--api-version=2` command line argument.
Clients can also select APIv2 by sending a [SetApiVersion](https://pkg.go.dev/github.com/go-delve/delve/service/rpccommon#RPCServer.SetApiVersion) request specifying `APIVersion = 2` after connecting to the headless instance.
Clients can also select APIv2 by sending a [SetApiVersion](https://pkg.go.dev/github.com/undoio/delve/service/rpccommon#RPCServer.SetApiVersion) request specifying `APIVersion = 2` after connecting to the headless instance.

# API version 2 documentation

All the methods of the type `service/rpc2.RPCServer` can be called using JSON-RPC, the documentation for these calls is [available on godoc](https://pkg.go.dev/github.com/go-delve/delve/service/rpc2#RPCServer).
All the methods of the type `service/rpc2.RPCServer` can be called using JSON-RPC, the documentation for these calls is [available on godoc](https://pkg.go.dev/github.com/undoio/delve/service/rpc2#RPCServer).

Note that all exposed methods take one single input parameter (usually called `args`) of a struct type and also return a result of a struct type. Also note that the method name should be prefixed with `RPCServer.` in JSON-RPC.

Expand Down
14 changes: 7 additions & 7 deletions Documentation/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ Set breakpoint condition.

Specifies that the breakpoint, tracepoint or watchpoint should break only if the boolean expression is true.

See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.
See [Documentation/cli/expr.md](//github.com/undoio/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.

With the -hitcount option a condition on the breakpoint hit count can be set, the following operators are supported

Expand Down Expand Up @@ -260,7 +260,7 @@ Changes the value of a configuration parameter.
Adds or removes a path substitution rule, if -clear is used all
substitute-path rules are removed. Without arguments shows the current list
of substitute-path rules.
See also [Documentation/cli/substitutepath.md](//github.com/go-delve/delve/tree/master/Documentation/cli/substitutepath.md) for how the rules are applied.
See also [Documentation/cli/substitutepath.md](//github.com/undoio/delve/tree/master/Documentation/cli/substitutepath.md) for how the rules are applied.

config alias <command> <alias>
config alias <alias>
Expand Down Expand Up @@ -582,7 +582,7 @@ Evaluate an expression.

[goroutine <n>] [frame <m>] print [%format] <expression>

See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.
See [Documentation/cli/expr.md](//github.com/undoio/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions.

The optional format argument is a format specifier, like the ones used by the fmt package. For example "print %x v" will print v as an hexadecimal number.

Expand All @@ -597,7 +597,7 @@ Print contents of CPU registers.

regs [-a]

Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md).
Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md](//github.com/undoio/delve/tree/master/Documentation/cli/expr.md).


## restart
Expand Down Expand Up @@ -640,15 +640,15 @@ Changes the value of a variable.

[goroutine <n>] [frame <m>] set <variable> = <value>

See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions. Only numerical variables and pointers can be changed.
See [Documentation/cli/expr.md](//github.com/undoio/delve/tree/master/Documentation/cli/expr.md) for a description of supported expressions. Only numerical variables and pointers can be changed.


## source
Executes a file containing a list of delve commands

source <path>

If path ends with the .star extension it will be interpreted as a starlark script. See [Documentation/cli/starlark.md](//github.com/go-delve/delve/tree/master/Documentation/cli/starlark.md) for the syntax.
If path ends with the .star extension it will be interpreted as a starlark script. See [Documentation/cli/starlark.md](//github.com/undoio/delve/tree/master/Documentation/cli/starlark.md) for the syntax.

If path is a single '-' character an interactive starlark interpreter will start instead. Type 'exit' to exit.

Expand Down Expand Up @@ -732,7 +732,7 @@ Set tracepoint.

trace [name] [locspec]

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 locspec. If locspec is omitted a tracepoint will be set on the current line.
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/undoio/delve/tree/master/Documentation/cli/locspec.md) for the syntax of locspec. If locspec is omitted a tracepoint will be set on the current line.

See also: "help on", "help cond" and "help clear"

Expand Down
2 changes: 1 addition & 1 deletion Documentation/cli/expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To see more values use the slice operator:

For this purpose delve allows use of the slice operator on maps, `m[64:]` will return the key/value pairs of map `m` that follow the first 64 key/value pairs (note that delve iterates over maps using a fixed ordering).

These limits can be configured with `max-string-len` and `max-array-values`. See [config](https://github.com/go-delve/delve/tree/master/Documentation/cli#config) for usage.
These limits can be configured with `max-string-len` and `max-array-values`. See [config](https://github.com/undoio/delve/tree/master/Documentation/cli#config) for usage.

# Interfaces

Expand Down
Loading