Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f7e1116
Improve coverage of record-replay backends by allowing recording.
gareth-rees Oct 13, 2021
3ce877a
Rename import paths to point to our fork.
gareth-rees Jan 13, 2022
2f47dc6
Remove build status information from README.
dpapastamos Jul 29, 2019
f6af707
Improved method for reading the G pointer on x86.
gareth-rees Jan 13, 2022
991b817
Support for Undo record/replay backend.
dpapastamos May 28, 2019
2517635
Exclude TestCallFunction cases that fail with the Undo backend.
gareth-rees Mar 30, 2022
cc9fb86
Handle end of history correctly for udbserver backend.
mark-undoio May 25, 2023
03956c1
Factor fetching the current time out into separate Undo code.
mark-undoio Jun 5, 2023
9b776eb
Provide clearer display of current Undo time.
mark-undoio Jun 5, 2023
374f180
Clear stepping breakpoints on process exit.
mark-undoio Jun 6, 2023
9e6f2e3
Resolve udbserver path relative to udb path.
mark-undoio Jun 14, 2023
5108c38
Implement basic progress indicator support in Delve.
mark-undoio Jun 26, 2023
01bae8b
Separate the parsing and formatting of Undo Engine times.
mark-undoio Jul 7, 2023
109a06c
Fix checkpoints list output to contain human-readable times.
mark-undoio Jul 7, 2023
eddce42
Format bbcount as comma-separated thousands groups.
mark-undoio Jul 10, 2023
76926eb
Add magic "start" and "end" checkpoints for Undo backend.
mark-undoio Jul 6, 2023
2b798f9
Update restart arg parsing to validate start/end and handle times.
mark-undoio Jul 12, 2023
5996cba
Move "local checkpoint" management code into an Undo session object.
mark-undoio Jul 13, 2023
918ee54
Implement save and load of checkpoints with an Undo session file.
mark-undoio Jul 14, 2023
9420aa0
Fix naming of checkpointLastId -> checkpointNextId.
mark-undoio Jul 27, 2023
fb64065
Fix bug in handling zero-argument "restart" command.
mark-undoio Jul 27, 2023
d24d0e0
Fix a bug with inferior calls by tracking volatile mode state.
mark-undoio Jul 25, 2023
c25e70b
Consistently act on a gdbConn in the undoSession layer.
mark-undoio Aug 1, 2023
7a397d9
Eliminate separate isUndoServer boolean.
mark-undoio Aug 1, 2023
97de217
Move Undo's time travelling out of restart and into our module.
mark-undoio Aug 1, 2023
7d87e23
Move undoCmd out of gdbConn code and into undo.go.
mark-undoio Aug 1, 2023
5e657fa
Use lower case for error message, in line with Go convention.
mark-undoio Aug 2, 2023
8ab9245
Simplify travelToTime implementation further.
mark-undoio Aug 2, 2023
3678774
Move details of maintaining progress indicators into undo.go.
mark-undoio Aug 2, 2023
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 .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ name = "go"
enabled = true

[analyzers.meta]
import_path = "github.com/go-delve/delve"
import_path = "github.com/undoio/delve"
dependencies_vendored = true
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.
10 changes: 5 additions & 5 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 @@ -39,11 +39,11 @@ The `--log-dest` option can be used to redirect the "API server listening at:" m

Once you have a running headless instance you can connect to it and start sending commands. Delve's protocol is built on top of the [JSON-RPC 1.0 specification](https://www.jsonrpc.org/specification_v1).

The methods of a `service/rpc2.RPCServer` are exposed through this connection, to find out which requests you can send see the documentation of RPCServer on [godoc](https://godoc.org/github.com/go-delve/Delve/service/rpc2#RPCServer).
The methods of a `service/rpc2.RPCServer` are exposed through this connection, to find out which requests you can send see the documentation of RPCServer on [godoc](https://godoc.org/github.com/undoio/Delve/service/rpc2#RPCServer).

### Example

Let's say you are trying to create a breakpoint. By looking at [godoc](https://godoc.org/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 [godoc](https://godoc.org/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
9 changes: 4 additions & 5 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 @@ -44,13 +44,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 Down Expand Up @@ -143,4 +142,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://godoc.org/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://godoc.org/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://godoc.org/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://godoc.org/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
6 changes: 3 additions & 3 deletions Documentation/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Sets a breakpoint.

break [name] [locspec]

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 breakpoint will be set on the current line.
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 breakpoint will be set on the current line.

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

Expand Down Expand Up @@ -577,7 +577,7 @@ 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 @@ -645,7 +645,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 @@ -63,7 +63,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