101 Commits

Author SHA1 Message Date
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
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
213eb97e24 teamcity: don't sign binaries on CI 2025-09-15 15:33:18 +02:00
8e2d698c54 go.mod: upgrade simplelru to v2 (#4143)
Fixes #4142
2025-09-10 11:23:10 -04:00
f3f3d57c63 *: update trie to v3.2.0 (#4131) 2025-09-03 10:10:52 +02:00
549358415f *: install capslock after env var setup (#4122) 2025-09-01 09:13:40 +02:00
4f8fa07cbd cmd/dlv: add capslock check (#4106) 2025-08-31 18:06:05 +02:00
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
2d9dec034b cmd/dlv: update staticcheck (#3989)
Update staticcheck and re-enable it on go1.24.x
2025-04-14 09:21:34 -07:00
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
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
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
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
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
2a9af735d0 _scripts: update staticcheck version (#3839)
Update version of staticcheck and reenable for go1.23
2024-10-23 12:40:35 -07:00
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
75c41f2b64 delve: add linux-riscv64 support (#3785) 2024-10-11 12:34:25 -07:00
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
3ae22627df *: replace old golang.org links with new go.dev (#3774) 2024-07-12 12:12:44 -07:00
ef13067401 pkg: refactor to buf.WriteString() (#3769) 2024-07-11 08:06:51 -07:00
35ebb085c5 *: update actions/checkout to v4 (#3731) 2024-05-22 16:17:41 -07:00
b4fc206a7b _scripts: upgrade to python3 (#3716)
Upgrade python script to python3
2024-05-08 10:30:57 -07:00
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
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
dab870bd96 make.go: do not recodesign when rebuilding (#3639) 2024-01-19 11:51:22 -08:00
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
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
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
255afbfdb7 all: remove obsolete build tags "// +build" (#3513) 2023-10-03 08:50:11 -07:00
899ba72505 all: replace deprecated io/ioutil with io and os (#3509) 2023-09-25 11:41:59 -07:00
ffd1c396c2 _scripts: remove unnecessary os.ExpandEnv (#3504) 2023-09-19 09:30:18 -07:00
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
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
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
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
71f1220717 *: add ppc64le support (#2963)
* Add vendor/golang.org/x/arch/ppc64

* Add ppc64le support
2023-07-07 09:30:38 -07:00
7d8f47674b terminal/starbind: add online help for starlark (#3388)
Adds a new starlark builtin 'help' that prints the list of available
builtins when called without arguments and help for the specified
builtin when passed an argument.

The help is autogenerated from godoc comments so it isn't always
exactly accurate for starlark (in particular we sometimes refer to the
In structs), but it's better than nothing.
2023-06-12 14:31:31 -07:00
9d6bce467c _scripts: fix typos (#3402) 2023-05-31 16:33:23 +02:00
674bd63996 proc: fix runtime type handling for Go 1.21 (#3370)
Go 1.21 renamed runtime._type to internal/abi.Type and changed the name
of its fields. Update Delve so that it uses the new names for loading
interfaces and generic type parameters.
2023-05-15 10:21:52 -07:00
d71b3aa6a7 dwarf/op: change generated comment header (#3288)
Change generated comment header for opcodes.go to match Go regexp:
```
^// Code generated .* DO NOT EDIT\.$
```

Fix panic in gen-opcodes.go if no args provided.
2023-02-25 14:12:12 +01:00
3d6730d12e Default to stop test_windows.ps1 when there is an error (#3285)
* default to stop test_windows.ps1 when there is an error

* fix script
2023-02-22 09:25:29 -08:00
bc5c0d4a9b _scripts: Update staticcheck (#3270) 2023-02-14 09:36:00 -08:00
011fe673fe _scripts: fix log.Printf format specifier (#3260) 2023-01-31 14:30:04 +01:00
709da9a217 Documentation: document how to debug runtime with Delve (#3234)
Add FAQ entry to document how to debug the Go runtime using Delve.
Also add table of contents to FAQ.
2023-01-03 09:23:26 -08:00
32df4071d2 TeamCity: fix windows/amd64 builds (#3223)
Windows/amd64 builds are not runnning because the current settings.kts
has an implicity requirement to property teamcity.build.systemDir which
does not exist on windows/amd64 agents.
2022-12-19 08:15:00 -08:00
a35b902ecf gdbserial: continue if tcsetpgrp fails (#3211)
Do not stop if tcsetpgrp errors, also only do it if the target process
got its own process group.

Fixes #3210
2022-12-12 08:36:48 -08:00
e5006c105c Test windows/arm64 pipeline (#3200)
* Test windows/arm64 pipeline

* update build script to support windows/arm64

* skip TestLaunchRequestWithRelativeExecPath is symblink can't be created

* partially fix and skip TestCgoStacktrace

* update backend health docs

* update

* log test output

* skip starbind test on windows arm64

* skip starbind test on windows arm64

* skip rtype test on windows arm64

* skip pie backend tests on windows/arm64

* fix tests

* skip function calls test on windows/arm64

* fix tests

* revert hardware breakpoint test relax

* add pie test clarification

* skip symlink test only on windows

* skip TestStepConcurrentDirect

* readd exp.winarm64

* fix param

* add exp.winarm64 tags

* skip TestGeneratedDoc on winarm64
2022-12-05 15:21:52 -08:00
a185d0eac1 Run CI tests on windows/arm64 agents (#3198) 2022-11-17 13:52:38 +01:00
4372ce0d27 proc,_scripts/rtype.go: add rtype annotations for g.atomicstatus (#3143)
Adds some rtype annotations for g.atomicstatus and update
_scripts/rtype.go to handle types outside of the runtime package.
2022-09-26 10:10:51 -07:00
4455d6a9ef Add support for windows/arm64 (#3063)
* Add support for windows/arm64

* split sentinel files and add winarm64 experiment

* update loadBinaryInfoPE to support PIE binaries

* skip TestDump on windows/arm64

* run windows/arm64 compilation on windows/amd64

* add entry point check for pie binaries

* delete unusded code

* document windows/arm64 breakpoint

* implement changing windows/arm64 fp registers

* update crosscall offset names

* fix G load when using CGO

* fix testvariablescgo

* remove DerefGStructOffset

* derefrence gstructoffset in GStructOffset() if necessary
2022-09-21 13:39:44 -07:00