Commit Graph

63 Commits

Author SHA1 Message Date
Hyang-Ah Hana Kim
f83958b923
go.mod: sync golang.org/x/telemetry@58a1122356f5 (#3857)
This picks up a bug fix that will be helpful when delve starts to
test telemetry counters.

Related: https://go-review.googlesource.com/c/telemetry/+/625496
2024-11-18 09:00:05 -08:00
Hyang-Ah Hana Kim
ac8b4718bd
all: import go telemetry and enable crash reporting (#3841)
Imported golang.org/x/telemetry@9c0d19e to avoid
go version requirement change.

For #3815
For golang/go#70056
2024-10-29 12:12:42 -07:00
yelvens
abc948b0ae
all: update golang.org/x/arch to v0.11.0 (#3826)
added loong64 support for gnu format disassembler and plan9 format disassembler in golang.org/x/arch

$ go get -u golang.org/x/arch@v0.11.0
$ go mod tidy
$ go mod vendor

Co-authored-by: Huang Qiqi <huangqiqi@loongson.cn>
2024-10-09 08:10:11 -07:00
Alessandro Arzilli
a151be7eca
go.mod: update gopkg.in/yaml to v3 (#3776)
We are already importing v3 indirectly for github.com/spf13/cobra/doc,
update our own dependency to v3 as well so that we can delete one
module from the vendor directory.
2024-07-11 08:04:47 -07:00
Alessandro Arzilli
bae4dfbc4c
proc,go.mod: update x/sys remove KeepAlive calls (#3680)
* Cirrus-CI: update to FreeBSD 13.3

* proc,go.mod: update x/sys remove KeepAlive calls

Update version of golang.org/x/sys to the latest version and remove
calls to runtime.KeepAlive calls that were added to the FreeBSD backend
to work around an issue in the version of x/sys that we were using.
2024-03-04 11:36:46 -08:00
Suzy Mueller
5a9b835406
*: Upgrade github.com/google/go-dap (#3673) 2024-02-27 09:52:40 -08:00
Derek Parker
4a72c523be
pkg/proc: remove usage of gore dependency (#3664) 2024-02-21 12:10:41 +01:00
Derek Parker
f9b427b6db
*: update gore (#3659) 2024-02-13 08:12:59 +01:00
Derek Parker
efaf5523d8
*: update go-delve/gore (#3646) 2024-01-25 08:09:28 +01:00
Alessandro Arzilli
3372f5ce5a
go.mod: Update version of go-delve/liner (#3619)
Update version of go-delve/liner to include the Ctrl-Z fix (SIGTSTP
should be sent to our process group instead of just sending it to
ourselves to correctly imitate a terminal).

Fixes #3605
2024-01-02 20:12:30 -08:00
Derek Parker
050a108c3c
*: Update gore dep for 1.22 (#3611) 2023-12-27 18:28:56 +01:00
Derek Parker
dda8f693e6
*: Use forked goretk/gore module (#3597)
This allows us to update this dependency on our schedule which is important because the module relies on manually updating the known list of Go versions to function correctly. Forking allows us to keep this up to date ourselves and possibly create a new system to prevent having to perform this manual step in the future.
2023-12-12 10:13:32 +01:00
Michael Pratt
d8ed28ff35
all: run go mod tidy (#3589)
Fixes #3588.
2023-11-28 17:01:56 -08:00
Derek Parker
6e8e1cee9b
pkg/proc: use gore to obtain info from stripped binaries (#3577)
This patch switches from using a forked version of one of the libraries
of goretk/gore to using the module directly. This is possible now that
certain functionality has been exposed / fixed within that module making
it usable for Delve.
2023-11-23 09:12:10 +01:00
Derek Parker
4d1c1f3a36
*: update dependencies (#3552) 2023-11-04 17:07:55 +01:00
Alessandro Arzilli
e0b4bfbed3
Various fixes for go 1.22 (#3455)
* proc: correctly update local variables after continue

At various point during the execution of the call injection protocol
the process is resumed and the call injection goroutine could migrate
to a different thread, we must make sure to update our local variables
correctly after every point where the target program is resumed.

'fncall122debug_clean' on 'f469a0a5'.

* go.mod: update golang.org/x/tools

Go 1.22 broke golang.org/x/tools/packages

* cmd/dlv: disable TestStaticcheck with go1.22

Go 1.22 is not yet supported by staticcheck.
2023-09-19 09:34:34 -07:00
Alessandro Arzilli
f469a0a57a
go.mod: update version of github.com/cilium/ebpf (#3491)
Fixes #3490
2023-08-30 10:22:08 -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
Suzy Mueller
e549a02f0e
service/dap: update go-dap to latest (#3414)
* service/dap: update go-dap to latest

* update remaining possible nil checks

* move helper functions to the end of the file
2023-06-12 14:29:44 -07:00
Hyang-Ah Hana Kim
9f731debb1
go.mod: update github.com/google/go-dap to v0.7.0 (#3237)
* go.mod: update github.com/google/go-dap to v0.7.0

Updates https://github.com/google/go-dap/issues/66

* Run go mod tidy
2023-01-03 08:40:51 -08:00
Russell Kennington
753cb4cc3b
Update github.com/derekparker/trie dependency (#3219) 2022-12-14 07:36:07 +01:00
Alessandro Arzilli
b9a8bd7f41
*: early fixes for go1.20 (#3180)
- updated go/packages to support new export format
- rewrite testinline.go fixture because the compiler got too smart with
  constant folding
- temporarily disable staticcheck on go1.20 because it doesn't support
  the new export format.
- workaround for go.dev/cl/429601
2022-12-05 09:02:22 -08:00
Alessandro Arzilli
0fedc08b90
go.mod,proc: upgrade golang.org/x/sys/unix (#3134)
Upgrade golang.org/x/sys/unix so that it contains go.dev/cl/419915, a
fix for FreeBSD's ptrace functions that used *byte to represent
addresses on the tracee address space.
2022-09-20 11:45:50 -07:00
Alessandro Arzilli
dc76cc250d
go.mod: update starlark dependency (#3112)
Fixes issue where Delve fails to start if starlark can not allocate a
large amount of memory at startup.

Fixes #2907
2022-08-22 12:46:26 -07:00
Alessandro Arzilli
0764cc3aa0
vendor: update version of go/packages to 0.1.11 (#3053)
The current version we use now crashes with go1.19:

https://github.com/golang/go/issues/45584
2022-07-05 10:04:48 -07:00
Hyang-Ah Hana Kim
d05e88cca2
go.mod: use pseudo verion for github.com/go-delve/liner (#3026)
Fixes #3025
2022-06-02 17:56:28 +02:00
Hyang-Ah Hana Kim
cec23c0aa1
go.mod: require go-delve/liner instead of peterh/liner (#2905)
Use of `replace` in go.mod breaks delve installation using
`go install`. (see https://github.com/golang/go/issues/40276)
Workaround this limitation by explicitly require the fork
github.com/go-delve/liner.

go-delve/liner@v1.2.2-1 already has go.mod module name fixed
to be github.com/go-delve/liner.

Fixes go-delve/delve#2904
2022-02-14 18:42:43 +01:00
Derek Parker
dee4437bd0
pkg/terminal: support ctrlz for shell job control (#2806)
* pkg/terminal: support ctrlz for shell job control

This required forking peterh/liner under the go-delve org and using that
instead since upstream is not open to supporting this feature.

Fixes #2157

* Update liner

* Update liner but correctly this time

* upgrade golang.org/x/tools to 0.1.9
2022-02-10 09:50:55 -08:00
Alessandro Arzilli
5862e40192
go.mod: bump liner version (#2874)
Bump versio of github.com/peterh/liner to 1.2.2 that contains a fix for
a bug on windows.

Fixes #2869
2022-01-18 09:02:30 -08:00
Alessandro Arzilli
4a94b3eff2
Updates for go1.18beta1 (#2831)
* go.mod: update golang.org/x/tools to v0.1.8

Fixes TestGeneratedDoc on go1.18

* TeamCity: bump test matrix

Add 1.18 to test matrix. Remove 1.15 from test matrix and from support range.

* proc,tests: update for regabi on arm64 and 386

Make sure that stacktrace registers always contain the PC register of
the current frame, even though the debug_frame rules might not specify
it on architectures that use a link register.
The PC register is needed to look up loclist entries for variable
evaluation.

* goversion: bump maximum supported Go version to 1.18

* proc: disable asyncpreempt on linux/arm64

Asyncpreempt on linux/arm64 can sometimes restart a sequence of
instructions which will make breakpoint appear to be hit twice in some
cases.
2021-12-22 10:26:21 -08:00
Derek Parker
cd9e6c02a6
*: Replace libbpfgo with cilium/ebpf (#2771) 2021-11-03 16:58:04 +01:00
Alessandro Arzilli
c207db792a
proc,locspec: support setting breakpoints by func name on generic funcs (#2745)
* proc,locspec: support setting breakpoints by func name on generic funcs

Changes proc.Function to parse function names correctly when they
contain instantiation lists and locspec to match generic functions.

* vendor: update golang.org/x/tools

The old version of golang.org/x/tools is incompatible with the new
iexport format.
2021-10-30 11:52:26 -07:00
polinasok
b03d468b24
go.mod: update google/go-dap to 0.6.0 (#2710)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-09-22 21:26:40 -07:00
Davide Masserut
9f8b352a98
vendor: update liner dependency (#2700)
This change update liner to the latest release that adds support to
delete the next and the previous word with Alt-d and Alt-BackSpace
plus a small amount of fixes.
2021-09-22 21:15:02 -07:00
Hyang-Ah Hana Kim
1433c07957
dap: define LaunchConfig/AttachConfig types (#2571)
Formally define these types and document their meaning.
We will auto-generate the dlv-dap documentation from these Go type doc.

mapToStruct is a helper that sets the given struct's fields with the
info in map[string]interface{} (launch/attach's Arguments). We achieve
this by reencoding map[string]interface{} to json and decoding back to
the target struct. If go-dap left the implementation-specific arguments
as json.RawMessage and let the implementation decode as needed, this
reencoding could've been avoided.

encoding/json itself does not have mean to enforce required fields.
There was a test case that checks substitutePath elements must set
both from/to fields. Path.UnmarshalJSON implements the check.
I am not yet sure about the need for distinction between missing
'from/to' and empty strings yet. (empty value is useful when dealing with
a binary built with trimpath, right?)

A minor behavior change - previously, if noDebug is not a boolean type,
we ignored the attribute silently. Since we use json decoding, any
mismatched types will cause an error and this non-boolean type noDebug
attribute will result in launch failure.
2021-08-26 14:42:58 +02:00
Derek Parker
43d50202f3
pkg/terminal: Allow fuzzy searching tab completions (#2633)
This patch implements fuzzy searching for tab completions in the
terminal client. Under the hood it is using a trie data structure
(https://en.wikipedia.org/wiki/Trie) to perform very fast prefix / fuzzy
searches.
2021-08-05 19:55:27 +02:00
Derek Parker
10406f96d5
*: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
Hyang-Ah Hana Kim
f74b7a6e39
all: update github.com/spf13/cobra to v1.1.3 (#2572)
This removes indirect dependencies from go.mod, and
includes the fix for the missing -help flag info.

The latest cobra release is v1.2.1. Given that there were
minor security-related dependency cleanup during v1.2 release,
I was tempted to pick up the latest version, but that caused
dependency updates in golang.org/x/sys and golang.org/x/tools
which may be too recent (golang.org/x/* follow the go's release
support policy, so recent versions may not be compatible with
go versions beyond go's official version support policy).

Verified that dlv still builds with go1.12.x.
(go1.12 is the oldest version of go that can build the latest delve already).

$ go get -d github.com/spf13/cobra@v1.1.3
$ go mod tidy
$ go mod vendor
$ go run _scripts/gen-usage-docs.go
2021-07-22 11:05:37 -07:00
polinasok
6a25ee09f5
go.mod: update google/go-dap to 0.5.0 (#2460)
* go.mod: update google/go-dap to 0.5.0

* Go mod tidy

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-05-04 12:33:50 -07:00
polinasok
731f5ed346
go.mod: update google/go-dap to 0.4.0 (#2248)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2020-12-04 08:58:55 -08:00
Eli Bendersky
347777295d
service/dap: pull in newer version of google/go-dap (#2167)
Pulls in v0.3.0 of google/go-dap; this version has some fixes and API
improvements which service/dap will be able to leverage to clean up some
code.
2020-09-15 14:43:13 -07:00
Alessandro Arzilli
7dde930033
terminal: use new mechanism to cancel starlark threads (#2149)
* vendor: update starlark

* terminal: use new mechanism to cancel starlark threads

See: https://github.com/google/starlark-go/pull/298
2020-08-24 13:36:12 -07:00
Waleed Gadelkareem
b14182324d
Update cosiner/argv to v0.1.0 (#2088) 2020-06-24 10:00:37 -07:00
Alessandro Arzilli
9881edaa99
vendor: remove github.com/pkg/profile dependency (#2053)
It is only used in benchmarks and 'go test' now has command line
options to enable profiling as appropriate (but maybe it didn't in
2014).
2020-05-14 10:16:09 -07:00
Alessandro Arzilli
a33be4466f
vendor: update logrus dependency (#2048)
Fixes #2037
2020-05-11 15:44:01 -07:00
Derek Parker
3e60ae202b *: Add --tty flag for debug / exec
This flag allows users on UNIX systems to set the tty for the program
being debugged by Delve. This is useful for debugging command line
applications which need access to their own TTY, and also for
controlling the output of the debugged programs so that IDEs may open a
dedicated terminal to show the output for the process.
2020-04-10 09:53:13 -07:00
Alessandro Arzilli
7cd12c34fd
proc,dwarf: cache debug.Entry objects (#1931)
Instead of rescanning debug_info every time we want to read a function
(either to find inlined calls or its variables) cache the tree of
dwarf.Entry that we would generate and use that.

Benchmark before:

BenchmarkConditionalBreakpoints-4   	       1	5164689165 ns/op

Benchmark after:

BenchmarkConditionalBreakpoints-4   	       1	4817425836 ns/op

Updates #1549
2020-03-20 10:23:10 -07:00
Derek Parker
731a7fc125 *: consolidate appends where possible 2020-03-19 10:25:09 +01:00
aarzilli
d1c63500e8 go.mod: remove unused dependencies, go mod tidy 2020-03-03 10:45:17 -08:00
Eli Bendersky
23b8e59ab9
service/dap: Add panic guard to DAP handlers (#1895)
* Panic guard for DAP request handling

* Use GetSeq

* Re-vendor new version of go-dap

* Remove comment

* Update error message

* Reuse er.Message in Format
2020-02-25 21:00:54 -08:00