115 Commits

Author SHA1 Message Date
Alessandro Arzilli
aea4d000da
_scripts: fallback to calling go if goreleaser is not installed (#4286) 2026-03-15 08:46:24 -07:00
Alessandro Arzilli
5ca401718d
config,terminal: better documentation for configuration file (#4282)
Provide an online documentation for the configuration file parameters
and the 'config' command.
Until now the configuration parameters were only documented in the
default configuration file and in the source code, neither of which is
very discoverable.
2026-03-10 12:34:56 -07:00
Derek Parker
25e1565230
build: add goreleaser release automation with cosign signing (#4278)
Adds goreleaser-based release automation integrated with GitHub Releases.

On pushing a v* tag, the release workflow cross-compiles dlv for 8
platforms (linux/darwin/windows × amd64/arm64/386/ppc64le where
supported), packages them as .tar.gz/.zip archives, generates a SHA256
checksums file, signs checksums.txt with cosign keyless signing via
GitHub Actions OIDC, and publishes everything to GitHub Releases.

A workflow_dispatch trigger supports dry-run testing without publishing.

Changes:
- .goreleaser.yaml: goreleaser v2 config for builds, archives,
  checksums, cosign signing, and GitHub Release publishing
- .github/workflows/release.yml: release workflow with tag push and
  manual dispatch triggers
- _scripts/make.go: make build now delegates to goreleaser
  --single-target so local and release builds share identical config
- Documentation/installation/README.md: document binary release
  download and cosign verification
- CONTRIBUTING.md: document goreleaser v2 as a build prerequisite

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 17:24:42 +01:00
Ville Skyttä
431e4a14c1
deps: migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 (#4257)
* deps: migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3

gopkg.in/yaml.v3 is unmaintained, ref
https://github.com/yaml/go-yaml#project-status

Upgrade to 3.0.4 while at it.

3.0.1...3.0.2 diff (3.0.1 are identical):
https://gist.github.com/scop/6ec72debf62a9603cff9dc97e6814ddd

3.0.2...3.0.4 diff:
https://github.com/yaml/go-yaml/compare/v3.0.2...v3.0.4

* deps: vendor go.yaml.in/yaml/v3

* deps: upgrade github.com/spf13/cobra to 1.10.2

* deps: vendor github.com/spf13/cobra update changes
2026-02-16 09:21:35 -08:00
Alessandro Arzilli
373f61cc27
capslock: update capslock output (#4224) 2026-01-05 14:10:19 -05:00
Derek Parker
4e4f29ce75
v1.26.0 (#4220)
* v1.26.0

* version: update Delve version
2025-12-19 18:36:18 +01:00
Alessandro Arzilli
3f9b21ea31
*: More fixes for Go 1.26 (#4211)
* TeamCity: fix download url in test_mac.sh

The direct link to storage.googleapis.com no longer works, use the one
that's on the website.

* proc: fix loading goroutine labels

The format used to store goroutine labels changed again. Adapt to the change.

* Cirrus-CI: upgrade FreeBSD image used

14.2 no longer exists
2025-12-08 13:56:00 -05:00
Derek Parker
62d821a5e4
*: update riscv64 capslock file (#4210)
This also updates the test to output the correct command to regenerate
these files, and fixes the generation script to generate the riscv64
output file.
2025-12-02 21:19:53 +01:00
Quim Muntal
867c71b0f7
*: replace github.com/hashicorp/golang-lru with a custom lru cache (#4196)
* replace github.com/hashicorp/golang-lru with a custom lru cache

* fix caplocks

* use a mutex instead of rwmutex

* add lrucache tests

* move lru to its own package
2025-11-25 14:21:26 -05:00
lrzlin
997463564b
*: update riscv64 support and adding it in test matrix (#4190) 2025-11-25 14:02:02 -05:00
Alessandro Arzilli
6cfd55eb56
cmd/dlv,_scripts: move things that use x/tools/go/packages to new repo (#3990)
Move things that depend on golang.org/x/tools/go/packages to a new
repository so that they can use the latest version of that package
without forcing delve itself to need the latest version of Go.
2025-11-24 12:48:24 -05:00
Alessandro Arzilli
73aa61d45b
*: fix tests (#4198)
Fix test build error caused by merge conflict and regenerate capslock
output.
2025-11-10 12:12:39 -05:00
George Adams
cd7257f518
winarm64: remove experimental build tags (#4176)
* winarm64: remove experimental build tags

* update faq
2025-10-15 16:49:21 -04:00
Alessandro Arzilli
ba539b8aa1
proc: simplify and rename structMember (#4159)
With the recent changes in 1e3ccee (#4118) structMember became largely
reduntant with the new findStructMemberOrMethod. This commit simplifies
the code of structMember so that it does not handle embedded structs
and interfaces and changes its name to structField so that it can be
kept as an internal lightweight version of findStructMemberOrMethod.
2025-10-08 18:01:32 -04:00
George Adams
cb52d0cc1b
CI: add windows arm64 workflow (#4175)
* CI: add windows arm64 workflow

* add win-arm64 capslock

* add capslock build tag

* add servive test build tag

* skip proc_test.go

* unskip more tests

* skip TestHardcodedBreakpointCounts as flaky

* add gotip

* add version log to ps1

* switch logic to use stable json endpoint for getting latest go

* add continue-on-error for gotip
2025-10-08 17:44:12 -04:00
Derek Parker
fd4fc92c74
service,proc: fix tests to enable parallel runs (#4135)
* *: randomize testnextnethttp.go listen port

* service/test: prefer t.Setenv

* *: cleanup port pid files

* service: fix final parallelization bugs

* address review feedback

* pkg/proc: fix test on windows

* fix finding port file on TestIssue462
2025-09-29 11:13:03 -04:00
Alexey Shilov
213eb97e24
teamcity: don't sign binaries on CI 2025-09-15 15:33:18 +02:00
Alessandro Arzilli
8e2d698c54
go.mod: upgrade simplelru to v2 (#4143)
Fixes #4142
2025-09-10 11:23:10 -04:00
Derek Parker
f3f3d57c63
*: update trie to v3.2.0 (#4131) 2025-09-03 10:10:52 +02:00
Derek Parker
549358415f
*: install capslock after env var setup (#4122) 2025-09-01 09:13:40 +02:00
Derek Parker
4f8fa07cbd
cmd/dlv: add capslock check (#4106) 2025-08-31 18:06:05 +02:00
Keith Randall
091ff50645
proc: handle moving of direct interface flag in Go 1.26 (#4032)
This flag in internal/abi.Type is moving from the Kind_ field to
the TFlag field. See https://go-review.googlesource.com/c/go/+/681936

A few of the other Kind fields dlv doesn't use (and don't exist
in Go anymore), so this code can be simplified somewhat.
2025-06-17 16:04:52 -07:00
Alessandro Arzilli
2d9dec034b
cmd/dlv: update staticcheck (#3989)
Update staticcheck and re-enable it on go1.24.x
2025-04-14 09:21:34 -07:00
Alessandro Arzilli
7ea6d8fdf1
*: remove uses of reflect.MethodByName from all of Delve (#3916)
When reflect.MethodByName is used the linker can not fully perform
deadcode elimination. This commit updates cobra and rewrites the
suitableMethods part of service/rpccommon so that reflect.MethodByName
is not used and the linker can fully execute deadcode elimination.

The executable size on go1.24.0 on linux is reduced from 25468606 bytes
to 22453382 bytes or a reduction of approximately 12%.

See also:

https://github.com/spf13/cobra/pull/1956
https://github.com/aarzilli/whydeadcode
2025-02-17 18:44:05 -08:00
yelvens
d2f748f1bd
*: add support for linux/loong64 to native backend (#3892)
* delve: support linux-loong64 native debug

LoongArch is a new RISC ISA, which is independently designed by Loongson Technology.

LoongArch includes a reduced 32-bit version (LA32R), a standard 32-bit version (LA32S)
and a 64-bit version (LA64), and loong64 is the 64-bit version of LoongArch.

LoongArch documentation: https://github.com/loongson/LoongArch-Documentation.git

* *: mark loong64 port as experimental

---------

Co-authored-by: Huang Qiqi <huangqiqi@loongson.cn>
2025-01-17 09:41:37 -08:00
Alessandro Arzilli
477e46ebbd
pkg/proc: support swiss table map implementation (#3838)
Adds support for the swiss table implementation for Go's maps.
2024-12-04 19:14:47 -08:00
Alessandro Arzilli
698f838616
terminal/starbind: allow modification of structs returned by API (#3872)
Structs returned to starlark scripts by API calls were immutable, this
made amend_breakpoint nearly impossible to use since its argument must
be a api.Breakpoint struct which the caller has received from
get_breakpoint and modified.
2024-12-04 19:09:59 -08:00
Alessandro Arzilli
822014b8e8
service,terminal,cmd/dlv: automatically guessing substitute-path config (#3781)
Add command, API calls and launch.json option to automatically guess
substitute-path configuration.
2024-10-31 10:19:08 -07:00
Alessandro Arzilli
2a9af735d0
_scripts: update staticcheck version (#3839)
Update version of staticcheck and reenable for go1.23
2024-10-23 12:40:35 -07:00
Alessandro Arzilli
05dc760877
*: mark riscv64 port as experimental (#3835)
Delete non-working prologue detection code and mark port as experimental.

Updates #3832
2024-10-14 11:04:03 -07:00
lrzlin
75c41f2b64
delve: add linux-riscv64 support (#3785) 2024-10-11 12:34:25 -07:00
Alessandro Arzilli
64f3d34663
proc: move stepping test to their own file (#3784)
Move all tests of the functionality of proc.next,
proc.(*TargetGroup).Next, proc.(*TargetGroup).Step,
proc.(*TargetGroup).StepOut to their own test file.
2024-07-19 21:29:56 -07:00
Oleksandr Redko
3ae22627df
*: replace old golang.org links with new go.dev (#3774) 2024-07-12 12:12:44 -07:00
Oleksandr Redko
ef13067401
pkg: refactor to buf.WriteString() (#3769) 2024-07-11 08:06:51 -07:00
Abbas mkhzomi
35ebb085c5
*: update actions/checkout to v4 (#3731) 2024-05-22 16:17:41 -07:00
Alessandro Arzilli
b4fc206a7b
_scripts: upgrade to python3 (#3716)
Upgrade python script to python3
2024-05-08 10:30:57 -07:00
Alessandro Arzilli
2e88b7ead3
tests: fix tests on Go 1.23 (#3697)
* Adjust rtype.go script to handle constants moved to internal/abi from
  runtime
* Remove tests in service/dap/server_test that relied on knowledge of
  the internal layout of channels.
2024-04-11 09:40:57 -07:00
Alessandro Arzilli
5bd835a801
*: misc fixes for go1.23 (#3663)
- skip staticcheck on go1.23 for now
- fix reading interface values in go1.23
- sync list of waitreasons from go1.23
2024-02-22 11:35:15 -08:00
ardnew
dab870bd96
make.go: do not recodesign when rebuilding (#3639) 2024-01-19 11:51:22 -08:00
Alessandro Arzilli
1a1e215fac
TeamCity: speed up ppc64le CI (#3622)
The builder is currently spending 15 to 20 minutes installing gcc and
upgrading packages every time we run the tests.
Because of this the build fails sometimes by running out of time.
This change reduces that to 5 minutes by:

* switching from curl to wget (which seems to have fewer dependencies)
* not installing gcc on ppc64le
* skipping tests that depend on gcc or other binutils
2024-01-09 14:13:00 -08:00
Alessandro Arzilli
a8ee87e473
*: remove checks for TRAVIS env variable (#3568)
We had a few checks left over for the TRAVIS variable that detected if
we were running under the TravisCI build system.
This variable hasn't been set since 2020.
2023-11-16 10:42:41 -08:00
Alessandro Arzilli
90a1571f88
CI: update staticcheck version (#3533)
Update staticcheck version and re-enable TestStaticcheck on Go 1.22.
2023-10-20 10:05:58 -07:00
Oleksandr Redko
255afbfdb7
all: remove obsolete build tags "// +build" (#3513) 2023-10-03 08:50:11 -07:00
Oleksandr Redko
899ba72505
all: replace deprecated io/ioutil with io and os (#3509) 2023-09-25 11:41:59 -07:00
Oleksandr Redko
ffd1c396c2
_scripts: remove unnecessary os.ExpandEnv (#3504) 2023-09-19 09:30:18 -07:00
Alessandro Arzilli
32b937c953
teamcity: misc changes to CI (#3476)
- add architecture rule for ppc64le so that incompatible agents don't
  pick up the build
- disable PIE tests on linux/ppc64le (the tests claim it doesn't work)
- enable PIE tests on darwin/amd64 now that the entry point calculation
  has been fixed
- remove dependency on wget and curl in the test script for linux to
  reduce test time
- only install git in the linux test script when we need it
- remove staticcheck from linux/ppc64le builds (it takes almost 5
  minutes between installation and execution and makes the test timeout
  sometimes)
- drop windows/arm64/tip build, the windows/arm64 build is broken
  anyway and since there is only one agent it makes CI runs slow
- drop linux/ppc64le/tip build, there is only one agent, it's slow and
  it will always timeout. CI runs in excess of 1h are too long.
2023-08-22 09:24:25 -07:00
Alessandro Arzilli
891a1f080d
goversion,teamcity: update test matrix and fix build scripts (#3463)
Update test matrix to remove 1.18 and add 1.21, fix build scripts to
deal with the new format returned by:
	https://golang.org/VERSION?m=text
which now has an extra second line with the time.
2023-08-11 08:52:35 -07:00
Derek Parker
e49c81cc5d
*: Fix ppc64le test runs (#3460)
We must pass the build tag through during the 'vet' check, and
additionally there was some extra commands at the end of test_linux.sh
that were not necessary.
2023-08-11 08:51:28 -07:00
Alessandro Arzilli
caf6df0eb9
Documentation,cmd/dlv: clean up command line usage help (#3395)
Due to some very old mistakes too many of Delve's flags are declared as
persistent on cobra's root command. For example the headless flag is a
global flag but does not apply to connect, dap or trace; the backend
flag does not apply to replay, core and dap; etc.

Almost all global flags should have been declared as local flags on
individual subcommands. Unfortunately we can not change this without
breaking backwards compatibility, for example:

   dlv --headless debug

would not parse if headless was a flag of debug instead of a global
flag.

Instead we alter usage function and the markdown generation script to
strategically hide the flags that don't apply.

Fixes #2361
2023-08-09 10:37:55 -07:00
Álex Sáez
71f1220717
*: add ppc64le support (#2963)
* Add vendor/golang.org/x/arch/ppc64

* Add ppc64le support
2023-07-07 09:30:38 -07:00