Commit Graph

2249 Commits

Author SHA1 Message Date
Alessandro Arzilli
10332d6700
Documentation: document substitute-path more (#2998)
Add FAQ entry about substitute-path since it comes up often and link it
in the issue template.
2022-05-04 11:01:56 -07:00
Alessandro Arzilli
55e37e2fc8
proc/core: return true for calls to Recorded (#2979)
The recent refactoring that introduced ContinueOnceContext broke this old behavior.

Fixes #2978
2022-05-04 10:56:41 -07:00
Alessandro Arzilli
c9d800edb9
proc: support function call injection on arm64 (#2996)
* _scripts/test_linux.sh,_scripts/test_windows.ps1: always return exit code 0 when testing on tip

Same as what we do for test_mac.sh

* proc: support function call injection on arm64

Support function call injection on arm64 with go1.19
2022-05-03 10:46:24 -07:00
polinasok
d513b6da45
Documentation: add DAP launch/attach configuration matrix (#2991)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-05-03 10:35:56 -07:00
Alessandro Arzilli
2d9a9d439d
_scripts/test_linux.sh,_scripts/test_windows.ps1: always return exit code 0 when testing on tip (#2997)
Same as what we do for test_mac.sh
2022-05-03 10:35:24 -07:00
Alessandro Arzilli
9d269791d5
proc: fix autogenerated helper skip on linux/386 PIE builds (#2975)
The fix in #2959 was incomplete and the skip was still broken on
linux/386 for PIE builds due to calls to the get_pc_thunk helper.

Co-authored-by: a <a@kra>
2022-04-27 09:11:08 -07:00
Alessandro Arzilli
bfb7181e8d
_scripts: always return exit code 0 when testing on tip (#2980)
So that we can mute failing tests in TeamCity.
2022-04-27 09:10:23 -07:00
Joel Sing
5b16ddb7e2
proc: unlock OS thread on exit from handlePtraceFuncs (#2972)
On FreeBSD and OpenBSD, the use of runtime.LockOSThread is resulting in segfaults
within the Go runtime (see https://github.com/golang/go/issues/52394) - while it
should not be necessary, calling runtime.UnlockOSThread upon exit from
handlePtraceFuncs avoids this issue and allows the tests to run correctly.
2022-04-26 14:33:16 -07:00
Alessandro Arzilli
7ab33ac92f
service/debugger: close executable file (#2976)
Close executable file after we open it.
2022-04-26 14:32:22 -07:00
Joel Sing
c120db3467
proc: add support for setting additional registers on freebsd/amd64 (#2981)
These are needed for delve to work on freebsd/amd64 with regabi.
2022-04-26 14:31:48 -07:00
Joel Sing
9319cc34c9
service/debugger: make TestDebugger_LaunchWithTTY pass on FreeBSD (#2982)
FreeBSD does not have lsof, rather it has fstat. Additionally, the TTY name
does not match up with the current code.
2022-04-26 13:23:39 -07:00
Derek Parker
4009153466
v1.8.3 (#2990) 2022-04-26 09:33:28 +02:00
polinasok
4a91946fd9
v1.8.3 Changelog (#2988)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-25 09:04:42 -07:00
polinasok
5d37d8254b
Documentation: expand DAP launch/attach configurations section (#2977)
* Documentation: expand DAP launch/attach configurations section

* Fix link

* Fix link

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-21 14:25:32 -07:00
Adrien Barreau
aac4e19c24
Documentation: Fix example block in cli README (#2974) 2022-04-19 11:35:54 -07:00
Alessandro Arzilli
75b4421d70
_scripts/make: do not exit if git SHA ID can not be retrieved (#2973)
Something changed in TeamCity's infrastructure that makes 'git
rev-parse HEAD' fail systematically on most configurations.
Since the SHA ID isn't necessary anyway, print an error and continue.
2022-04-18 10:47:44 -07:00
Alessandro Arzilli
3138157826
proc: skip autogenerated functions correctly (#2959)
Adjust heuristic used to skip autogenerated functions so that it works
correctly with the new naming scheme in go1.18.

Fixes #2948
2022-04-13 15:28:56 -07:00
polinasok
a5532eb985
dlv dap: pass disable-aslr to backend (#2965)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-12 14:20:22 -07:00
Alessandro Arzilli
362522c6e6
gobuild: drop support for building on Go < 1.10 (#2960)
Remove code to build on old versions of Go that didn't support the all=
query for -gcflags.
2022-04-06 12:02:21 -07:00
polinasok
1669711c0e
Documentation/api/dap/README: add dlv dap usage link (#2957)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-04 12:02:43 -07:00
4ricci
3917104f7a
CHANGELOG.md: fix date typos (#2956) 2022-04-04 09:18:25 +02:00
polinasok
0b71eeca40
proc/gdbserial: shut down debuggee when failing to debug (#2953)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-01 10:31:23 -07:00
polinasok
6c368b78a9
debugger: clarify no debug info errors (#2954)
* debugger: clarify no debug info errors

* Fix typo

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-04-01 10:31:03 -07:00
polinasok
65e03d673d
dlv_test: fix TestChildProcessExitWhenNoDebugInfo to actually test strip binary (#2949)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-03-29 11:01:04 -07:00
Alessandro Arzilli
97405bbdd9
proc: allow low index == len in reslice (#2951)
Fixes #2950
2022-03-29 09:57:11 -07:00
Alessandro Arzilli
2b97231e30
proc,service: pretty print time.Time variables (#2865)
Fixes #999
2022-03-25 13:59:57 -07:00
cui fliter
9a9c1a9f33
*: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-23 16:10:00 +01:00
Derek Parker
cdf73b5365
Prefer locspec to linespec (#2941)
Often in the CLI documentation we were to inputs as linespec
when in reality we mean locspec which is a
location specifier, not necessarily a
line specifier.
2022-03-23 15:12:40 +01:00
polinasok
b5f60db954
service/dap: support terminateDebuggee option for attach only (#2940)
* service/dap: support terminateDebuggee option for attach only

* Update dlv_test

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-03-22 07:19:56 -07:00
Alessandro Arzilli
e1e4b09a5e
proc: move resume notify and manual stop handling to Target (#2921)
Moves handling of ResumeNotify and manualStopRequested to Target instead of the backends

Updates #2551
2022-03-21 12:42:37 -07:00
Alessandro Arzilli
a19931c9d3
proc/native/linux: replace uses of unix.Iovec for target addresses (#2922)
Replaces sys.Iovec with a similar struct that uses uintptr instead of
*byte for the base field when referring to addresses of the target
process, so that we do not generate invalid pointers.

Fixes #2919
2022-03-15 14:33:12 -07:00
polinasok
1d7bcd1d9e
Documentation/api/dap/README: add release version links (#2923)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2022-03-15 14:32:09 -07:00
hitzhangjie
fbfed8f8d9
service-*: conform to godoc comments (#2916) 2022-03-09 09:12:42 -08:00
Derek Parker
22fd222c0a
*: Bump version to 1.8.2 (#2920) 2022-03-08 10:20:49 -08:00
Derek Parker
51b44c899d
v1.8.3 (#2918) 2022-03-08 09:27:49 -08:00
Koichi Shiraishi
23612165e7
_scripts: handle not installed CommandLineTools (#2914)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2022-02-28 09:32:39 -08:00
Alessandro Arzilli
4c5b111abb
proc,debugger: move breakpoint ID counter to service/debugger (#2913)
Moves breakpoindIDCounter out of BreakpointsMap and into
service/debugger.Debuggger to simplify proc.Target's API and aid with
implementing fork follow mode, where we'll have to debug multiple
processes simultaneously.
2022-02-25 10:09:53 +01:00
Alessandro Arzilli
1418cfd385
proc: better handling of hardcoded breakpoints (#2852)
This commit improves the handling of hardcoded breakpoints in Delve.
A hardcoded breakpoint is a breakpoint instruction hardcoded in the
text of the program, for example through runtime.Breakpoint.

1. hardcoded breakpoints are now indicated by setting the breakpoint
   field on any thread stopped by a hardcoded breakpoint
2. if multiple hardcoded breakpoints are hit during a single stop all
   will be notified to the user.
3. a debugger breakpoint with an unmet condition can't hide a hardcoded
   breakpoint anymore.
2022-02-22 09:57:37 -08:00
Alessandro Arzilli
6ea826c363
proc: better error messages for ambiguous function calls/type casts (#2903)
Try to produce better error messages when we can't distinguish between
a function call and a type cast.

Fixes #2902
2022-02-22 09:55:59 -08:00
chainhelen
bb88e8b52e
pkg/terminal: add '-clear' option to 'condition' command (#2882)
This change adds the '-clear' to 'condition' which will clear
condtion on the breakpoint.

Co-authored-by: qianhailong <qianhailong@bytedance.com>
2022-02-15 18:41:23 +01: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
hitzhangjie
9c18bb46dd
terminal/colorize: avoid print multiple package by accidently ast.Node startPos==token.NoPos (#2898)
fix #2896
2022-02-10 09:50:31 -08:00
Alessandro Arzilli
a646d06544
proc: downgrade loadBuildID errors to warnings (#2893)
Most binaries do not have build-ids and it's fine, there's no reason to
report it as an error.
2022-02-08 10:54:05 -08:00
Alessandro Arzilli
1f0b39eab5
proc: fix crash trying to open separate debug info (#2901)
If debugInfoDirectories is set, the executable does not have debug info
and build-id is not set we should not crash.
2022-02-08 10:53:45 -08:00
Alessandro Arzilli
3829f4e06d
Version 1.8.1 (#2892)
Update CHANGELOG.md and version.
2022-02-07 09:53:07 -08:00
Alessandro Arzilli
e3f4c40bad
_scripts: fix camelToDash in gen-starlark-bindings.go (#2888)
Fix camelToDash so that it handles BuildID and CreateEBPFTracepoint
correctly.
2022-02-02 10:02:27 -08:00
Morten Linderud
8c392d2fdf
Implement source listing from debuginfo (#2885)
* service: Implement BuildID

Parse the BuildID of executables and provides it over the RPC
service.

Signed-off-by: Morten Linderud <morten@linderud.pw>

* command: Support debuinfod for file listing

Signed-off-by: Morten Linderud <morten@linderud.pw>

* debuginfod: create debuginfod package for common code

We remove the duplicated code and provide our a new debuginfod package.

Signed-off-by: Morten Linderud <morten@linderud.pw>

* starlark: Workaround for 'build_i_d'

Signed-off-by: Morten Linderud <morten@linderud.pw>

* command: Ensure we only overwrite path when one has been found

Signed-off-by: Morten Linderud <morten@linderud.pw>

* bininfo: Inline parseBuildID

Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-01-30 13:39:30 -08:00
Derek Parker
5b6f8ec03a
cmd/dlv: require arg for trace subcommand (#2848)
Fixes #2845
2022-01-29 13:18:24 +01:00
Alessandro Arzilli
5b925d4f5d
terminal: add transcript command (#2814)
Adds a transcript command that appends all command output to a file.
This command is equivalent to gdb's 'set logging'.

As part of this refactor the pkg/terminal commands to always write to a
io.Writer instead of using os.Stdout directly (through
fmt.Printf/fmt.Println).

Fixes #2237
2022-01-27 13:18:25 -08:00