Skip to content

Commit e3030de

Browse files
authored
Merge pull request #68 from visualfc/v125
update delve version
2 parents da1622d + 82fc158 commit e3030de

File tree

246 files changed

+14525
-6038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+14525
-6038
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ env:
22
GOFLAGS: -mod=vendor
33

44
freebsd_instance:
5-
image_family: freebsd-13-2
5+
image_family: freebsd-14-2
66

77
test_task:
88
install_script: pkg install -y go gcc git

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
Test:
1111
strategy:
1212
matrix:
13-
go-version: [1.18.x, 1.21.x]
14-
os: [ubuntu-latest, windows-latest, macos-11]
13+
go-version: [1.21.x, 1.22.x, 1.23.x, 1.24.x]
14+
os: [ubuntu-latest, windows-latest, macos-latest]
1515
runs-on: ${{ matrix.os }}
1616
steps:
1717
- uses: actions/checkout@v4

.teamcity/settings.kts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,25 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
4141
version = "2023.05"
4242

4343
val targets = arrayOf(
44-
"linux/amd64/1.20",
45-
"linux/amd64/1.21",
4644
"linux/amd64/1.22",
45+
"linux/amd64/1.23",
46+
"linux/amd64/1.24",
4747
"linux/amd64/tip",
4848

49-
"linux/386/1.22",
49+
"linux/386/1.24",
5050

51-
"linux/arm64/1.22",
51+
"linux/arm64/1.24",
5252
"linux/arm64/tip",
5353

54-
"linux/ppc64le/1.22",
54+
"linux/ppc64le/1.24",
5555

56-
"windows/amd64/1.22",
56+
"windows/amd64/1.24",
5757
"windows/amd64/tip",
5858

59-
"mac/amd64/1.22",
59+
"mac/amd64/1.24",
6060
"mac/amd64/tip",
6161

62-
"mac/arm64/1.22",
62+
"mac/arm64/1.24",
6363
"mac/arm64/tip"
6464
)
6565

@@ -268,6 +268,7 @@ class TestBuild(val os: String, val arch: String, val version: String, buildId:
268268
"386", "amd64" -> equals("teamcity.agent.jvm.os.arch", if (os == "mac") "x86_64" else "amd64")
269269
"arm64" -> equals("teamcity.agent.jvm.os.arch", "aarch64")
270270
"ppc64le" -> equals("teamcity.agent.jvm.os.arch", "ppc64le")
271+
// "riscv64" -> equals("teamcity.agent.jvm.os.arch", "riscv64") // The riscv64 needs a builder
271272
}
272273
when (os) {
273274
"linux" -> {

CHANGELOG.md

Lines changed: 157 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,158 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to Semantic Versioning.
55

6+
## [1.25.0] 2025-04-16
7+
8+
### Added
9+
- Go 1.25 support (#4014, @aarzilli) (more work went into the 1.24.2 and earlier releases)
10+
11+
### Fixed
12+
- Fixed several panics found via telemetry (#4026, #4018, #4017, #4015 @aarzilli)
13+
- Fixed git hash in version output (#3987, @codeaucafe)
14+
- Fix development version parsing (#3999, @aarzilli)
15+
- Fix call injection in newer macOS versions (#3988, @aarzilli)
16+
- Fix typo in goroutines help output (#4024, @jersey1dev)
17+
18+
### Changed
19+
- Internal breakpoints (panic, throw) are excluded from DAP response (#4027, @ConradIrwin)
20+
21+
## [1.24.2] 2025-04-10
22+
23+
### Added
24+
25+
- Support for struct literals in expression evaluator (#3935, #3953, @aarzilli)
26+
- Check to reject DWARFv5 executables if delve itself isn't built with 1.25 or later due to bugs in Go's standard library prior to 1.25 (#3943, #3961, @aarzilli)
27+
28+
### Fixed
29+
30+
- Support for macOS Sequoia 15.4 (#3966, @aarzilli)
31+
- Race conditions with rr backend (#3971, #3973, #3963, @BronzeDeer, @aarzilli)
32+
- Goroutine load with corrupted label maps (#3968, #3962, @hongyuh-hh)
33+
- Breakpoint conditions on suspended breakpoints (#3938, @Lslightly)
34+
35+
### Changed
36+
37+
- Miscellaneous test and documentation fixes (#3979, #3952, #3954, #3955, #3951, @alexandear, @codesoap, @derekparker)
38+
39+
## [1.24.1] 2025-03-05
40+
41+
### Added
42+
43+
- Support for linux/loong64 in native backend (#3892, @yelvens)
44+
- Support for watchpoints on interface values (#3922, #3924, @derekparker)
45+
- Improved support for DWARFv5 (#3893, @aarzilli)
46+
- Telemetry stack counters for internal errors (#3930, @aarzilli)
47+
- Support for zed editor and allow args in DELVE_EDITOR (#3899, @derekparker)
48+
49+
### Fixed
50+
51+
- Fix uprobe address in ebpf implementation (#3894, @3u13r)
52+
- Provide process events after launch in DAP (#3902, @shaunduncan)
53+
- Use rr version to determine style of qRRCmd (#3921, @aarzilli)
54+
- Better error message for breakpoints on stripped binaries (#3914, @aarzilli)
55+
- Switch to goroutine stack if no progress on thread stack (#3898, @aarzilli)
56+
- Handle wider registers in test (#3929, @derekparker)
57+
58+
### Changed
59+
60+
- Replace logrus with log/slog (#3918, @aarzilli)
61+
- Remove uses of reflect.MethodByName from all of Delve (#3916, @aarzilli)
62+
- Refactor sort.Sort to slices.SortFunc (#3880, @alexandear)
63+
- Allow access to thread registers after a function call (#3908, @aarzilli)
64+
- Remove riscv64 from TeamCity configuration (#3912, @aarzilli)
65+
66+
## [1.24.0] 2024-12-18
67+
68+
### Added
69+
70+
- Support for Go 1.24, particularly the new swiss table map implementation (#3882, #3879, #3838, @aarzilli)
71+
- Import go telemetry and enable crash reporting (#3841, @hyangah)
72+
- Enable stepping into coroutine (#3791, @aarzilli)
73+
- Add raw examinemem dump (#3721, @aarzilli)
74+
- Add linux-riscv64 support (experimental) (#3785, @lrzlin)
75+
- Automatically guessing substitute-path config (#3781, @aarzilli)
76+
- Print a message when the debuggee process exits while Delve in headless mode (#3870, @jakejx)
77+
- Allow accessing closure captured variable as if they were struct fields (#3866, @aarzilli)
78+
- Add dape to list of plugins (#3817, @jgarte)
79+
80+
### Fixed
81+
82+
- Fix step stuttering when entering range-over-func bodies (#3788, @aarzilli)
83+
- Fix formatting of autogenerated documentation (#3836, @aarzilli)
84+
- Fix issue on Windows when launching process while detached (#3867, @aarzilli)
85+
- Fix handling of unsatisfiable breakpoints during restart (#3868, @aarzilli)
86+
87+
### Changed
88+
89+
- Update 'client-addr' to support Unix domain sockets (#3819, @n1lesh)
90+
- Adds pointer pinning to call injection, improving function calls during debug session (#3787, @aarzilli)
91+
- Allow modification of starlark structs returned by API (#3872, @aarzilli)
92+
- API V1 has been removed following the deprecation from last version (#3881, @aarzilli)
93+
94+
## [1.23.1] 2024-09-23
95+
96+
Telemetry notice: starting with version 1.24.0 Delve will begin collecting opt-in telemetry data using the same mechanism used by the toolchain, see <https://github.com/golang/go/issues/68384>, <https://go.dev/doc/telemetry#background>, <https://github.com/go-delve/delve/issues/3815>.
97+
98+
### Fixed
99+
100+
- Debugging on macOS Sequoia (#3799, @aarzilli)
101+
- Various bugs with range-over-func loops (#3808, #3788, @aarzilli)
102+
- Reslice operator did not allow reslicing up to the slice's cap (#3796, @Jille)
103+
- Starlark access to named constants (#3802, @arvidfm)
104+
105+
106+
## [1.23.0] 2024-07-16
107+
108+
Deprecation notice: starting with the next version of Delve version 1 of the API will be removed. Version 2 was added in version 0.12.0 in 2017 and has been the recommended way to connect to Delve since.
109+
110+
### Added
111+
112+
- Support for Go 1.23, particularly the new range-over-func statement (#3663, #3697, #3736, #3738, #3750, #3755, #3763, #3778, @aarzilli)
113+
- `next-instruction` command (#3671, @derekparker)
114+
- Support reading captured variables of closure functions (#3682, @aarzilli)
115+
- Breakpoint command `break` now allows adding a condition the a breakpoint with a postfix notation (`break <name> <locspec> if <condition>`) (#3693, #3702, @derekparker)
116+
- When the `step` command is executed on `go funccall()` statements it will stop on the newly created goroutine (#3686, @aarzilli)
117+
- Invocation of [rr](https://github.com/rr-debugger/rr/) when it is used as a backend can be now controlled with environment variables `$DELVE_RR_RECORD_FLAGS` and `$DELVE_RR_REPLAY_FLAGS` (#3726, @aarzilli)
118+
- Added new suboption `--follow-calls` to trace command (#3594, @archanaravindar)
119+
120+
### Fixed
121+
122+
- Better behavior on stripped files (#3678, #3695, @aarzilli, @derekparker)
123+
- Support rr version 5.7.0 and later (#3705, #3718, @howardjohn, @aarzilli)
124+
- Watchpoints on newer versions of macOS (#3703, @derekparker)
125+
- Bug related to watchpoints going out of scope (#3742, @aarzilli)
126+
- Bug invoking debuginfod-find (#3762, @derekparker)
127+
- Miscellaneus fixes (#3707, #3761, #3759, #3767, @scop, @jayantxie, @aarzilli, @zdyj3170101136)
128+
129+
### Changed
130+
131+
- Improved auto-completions for shells (#3696, #3699, @scop)
132+
- Print more informations on tracepoint stops (#3675, #3712, @derekparker, @archanaravindar)
133+
- Improved performance of the default macOS backend (#3715, @derekparker)
134+
- When a breakpoint is hit on a headless instance of Delve while no clients are connected a message will be printed to stdout (#3632,#3747, @fatanugraha, @aarzilli)
135+
- Miscellaneous code and documentation improvements (#3676, #3677, #3698, #3716, #3727, #3722, #3730, #3731, #3753, #3752, #3756, #3757, #3741, #3773, #3775, #3770, #3769, #3772, #3779, #3774, @alexandear, @aarzilli, @abbasudo, @jayantxie)
136+
137+
## [1.22.1] 2024-02-21
138+
139+
### Added
140+
141+
- `--listen` and `connect` now support Unix Domain Sockets (#3655, ##3658, @aarzilli)
142+
- Paging for commands `print`, `vars`, `args` and `locals` (#3620, @aarzilli)
143+
- Syntax highlighting for stacktraces and options to change the color of Delve's prompt (#3649, #3648, @aarzilli)
144+
- Wait-for option for DAP's attach mode (#3656, @muggle-nil)
145+
146+
### Fixed
147+
148+
- Bug where Ctrl-Z was not sent to other processes in the same group as Delve (#3619, @aarzilli)
149+
- Parsing of `/proc/net/tcp` when it has 10000 or more entries (#3660, @michaelmerg)
150+
- Rare error when valuating expressions containing `runtime.frame(n)` inside breakpoint conditions (#3624, @aarzilli)
151+
- Line number reported for the stack frame that caused a panic (#3638, @aarzilli)
152+
- Building when dlv's executable already exists on macOS with a signing key already installed (#3639, @ardnew)
153+
154+
### Changed
155+
156+
- When evaluating an expression containing a reslice operation with constant bounds the entire resulting slice will be loaded (#3623, @aarzilli)
157+
6158
## [1.22.0] 2023-12-29
7159

8160
### Added
@@ -25,7 +177,7 @@ This project adheres to Semantic Versioning.
25177
### Changed
26178

27179
- Type casts from slice to string and vice versa will now use the load configuration for the target type, which is more intuitive (#3596, @aarzilli)
28-
- Miscellaneous impreovements to documentation (#3531, #3555, #3556, #3562, #3564, #3575, #3576, @alexandear, @testwill)
180+
- Miscellaneous improvements to documentation (#3531, #3555, #3556, #3562, #3564, #3575, #3576, @alexandear, @testwill)
29181

30182
## [1.21.2] 2023-10-30
31183

@@ -186,7 +338,7 @@ This project adheres to Semantic Versioning.
186338
- Add support for empty string in substitutePath (@RuijieC-dev)
187339
- Support gnu_debuglink section (@aarzilli)
188340
- Support exact matches in SubstitutePath (@eandre)
189-
- Add ability to show disassembly instead of source code (@aazilli)
341+
- Add ability to show disassembly instead of source code (@aarzilli)
190342
- Add -per-g-hitcount to breakpoint conditions (@yangxikun)
191343

192344
### Fixed
@@ -197,7 +349,7 @@ This project adheres to Semantic Versioning.
197349
- Do not panic reading bad G struct (@aarzilli)
198350
- Fix parsing DWARFv5 file table (@derekparker)
199351
- Improve trace subcommand output (@derekparker)
200-
- Fix documentation for examinemem (@aaarzilli)
352+
- Fix documentation for examinemem (@aarzilli)
201353
- Fix step instruction on 1 byte instruction with software breakpoint (@qmuntal)
202354
- Fix handling of function entry / return in ebpf tracing backend (@derekparker)
203355
- Fix size of ebpf type for fn_addr (@derekparker)
@@ -368,7 +520,7 @@ This project adheres to Semantic Versioning.
368520
### Fixed
369521

370522
* Correctly check for 1.17 and regabi (@aarzilli)
371-
* Print config output strings quouted (@aarzilli, @krobelus)
523+
* Print config output strings quoted (@aarzilli, @krobelus)
372524
* Update check for system goroutines (@suzmue)
373525
* DAP: Halt before detach in Stop (@polinasok)
374526
* DAP: Do not send halt request if debuggee is not running (@suzmue)
@@ -672,7 +824,7 @@ This project adheres to Semantic Versioning.
672824
- Ability to read goroutine ancestors if they are enabled by passing `GODEBUG="tracebackancestors=N"` (requires Go >= 1.11) (#1514, #1570, @aarzilli)
673825
- Breakpoint autocompletion for the command line client (#1612, @qingyunha)
674826
- Added reverse step-instruction command for rr backend (#1596, @dpapastamos)
675-
- Support debugging programs using plugins on Linux with Go 1.12 or later (#1413, #1414, @aarzilli)
827+
- Support debugging programs using plugins on Linux with Go 1.12 or later (#1413, #1414, @aarzilli)
676828
- Improved function call injection (#1503, #1504, #1548, #1591, #1602, @aarzilli)
677829
- New variable flag to mark variables that have a fake or no-longer-valid address, because they are either stored in registers or in a stack frame that has been removed from the stack (#1619, @aarzilli)
678830
- Support relative file paths when specifying breakpoint locations (#1478, @chainhelen)

Documentation/EditorIntegration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The following editor plugins for delve are available:
88
**Emacs**
99
* [Emacs plugin](https://github.com/benma/go-dlv.el/)
1010
* [dap-mode](https://github.com/emacs-lsp/dap-mode#go-1)
11+
* [dape](https://github.com/svaante/dape?tab=readme-ov-file#go---dlv)
1112

1213
**Goland**
1314
* [JetBrains Goland](https://www.jetbrains.com/go)

Documentation/api/ClientHowto.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Command line arguments that should be handed to the inferior process should be s
2727
dlv exec --headless ./somebinary -- these arguments are for the inferior process
2828
```
2929

30-
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`.
30+
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`.
3131

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

@@ -39,11 +39,11 @@ The `--log-dest` option can be used to redirect the "API server listening at:" m
3939

4040
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).
4141

42-
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).
42+
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 [Go Reference](https://pkg.go.dev/github.com/go-delve/delve/service/rpc2#RPCServer).
4343

4444
### Example
4545

46-
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`.
46+
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`.
4747

4848
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.
4949

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

193-
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)
193+
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)
194194
you should call RPCServer.FindLocation and
195195
then use the returned slice of Location objects to create Breakpoints to
196196
pass to CreateBreakpoint: just fill each Breakpoint.Addr with the
@@ -244,7 +244,7 @@ are interested in the topmost stack frame of the current goroutine (or
244244
thread) use: `EvalScope{ GoroutineID: -1, Frame: 0 }`.
245245

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

249249
### Variable shadowing
250250

Documentation/api/json-rpc/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ Note that this JSON-RPC interface is served over a streaming socket, *not* over
66

77
# API versions
88

9-
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.
10-
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.
9+
Delve currently only supports v2 of its API. Support for v1 was dropped in version v1.24.0 of Delve.
1110

1211
# API version 2 documentation
1312

14-
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).
13+
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).
1514

1615
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.
1716

Documentation/backend_test_health.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Tests skipped by each supported backend:
22

3-
* 386 skipped = 7
3+
* 386 skipped = 11
44
* 1 broken
55
* 3 broken - cgo stacktraces
6-
* 3 not implemented
6+
* 6 not implemented
7+
* 1 not working due to optimizations
78
* arm64 skipped = 1
89
* 1 broken - global variable symbolication
910
* darwin skipped = 3
@@ -13,32 +14,46 @@ Tests skipped by each supported backend:
1314
* 1 broken - cgo stacktraces
1415
* darwin/lldb skipped = 1
1516
* 1 upstream issue
16-
* freebsd skipped = 10
17+
* freebsd skipped = 13
1718
* 2 flaky
1819
* 2 follow exec not implemented on freebsd
19-
* 4 not implemented
20+
* 7 not implemented
2021
* 2 not working on freebsd
2122
* linux/386 skipped = 2
2223
* 2 not working on linux/386
2324
* linux/386/pie skipped = 1
2425
* 1 broken
26+
* linux/loong64 skipped = 2
27+
* 1 broken - cgo stacktraces
28+
* 1 not working on linux/loong64
2529
* linux/ppc64le skipped = 3
2630
* 1 broken - cgo stacktraces
2731
* 2 not working on linux/ppc64le when -gcflags=-N -l is passed
2832
* linux/ppc64le/native skipped = 1
2933
* 1 broken in linux ppc64le
3034
* linux/ppc64le/native/pie skipped = 3
3135
* 3 broken - pie mode
36+
* linux/riscv64 skipped = 2
37+
* 1 broken - cgo stacktraces
38+
* 1 not working on linux/riscv64
39+
* loong64 skipped = 9
40+
* 2 broken
41+
* 1 broken - global variable symbolication
42+
* 6 not implemented
3243
* pie skipped = 2
3344
* 2 upstream issue - https://github.com/golang/go/issues/29322
34-
* ppc64le skipped = 11
45+
* ppc64le skipped = 14
3546
* 6 broken
3647
* 1 broken - global variable symbolication
37-
* 4 not implemented
38-
* windows skipped = 6
48+
* 7 not implemented
49+
* riscv64 skipped = 8
50+
* 2 broken
51+
* 1 broken - global variable symbolication
52+
* 5 not implemented
53+
* windows skipped = 9
3954
* 1 broken
4055
* 2 not working on windows
41-
* 3 see https://github.com/go-delve/delve/issues/2768
56+
* 6 see https://github.com/go-delve/delve/issues/2768
4257
* windows/arm64 skipped = 5
4358
* 3 broken
4459
* 1 broken - cgo stacktraces

0 commit comments

Comments
 (0)