Skip to content

Commit

Permalink
Merge branch 'go-delve:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Dufty committed Sep 15, 2023
2 parents b397040 + 86020cd commit 953b145
Show file tree
Hide file tree
Showing 506 changed files with 47,832 additions and 10,949 deletions.
13 changes: 0 additions & 13 deletions .deepsource.toml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
tags
.dbg_history
**/**/dlv
!cmd/dlv/
.vagrant
**/*.swp
localtests
Expand Down
23 changes: 16 additions & 7 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,27 @@ To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View
version = "2020.2"

val targets = arrayOf(
"linux/amd64/1.18",
"linux/amd64/1.19",
"linux/amd64/1.20",
"linux/amd64/1.21",
"linux/amd64/tip",

"linux/386/1.20",

"linux/arm64/1.20",
"linux/arm64/1.21",
"linux/arm64/tip",

"windows/amd64/1.20",
"linux/ppc64le/1.21",

"windows/amd64/1.21",
"windows/amd64/tip",

"windows/arm64/1.20",
"windows/arm64/tip",
"windows/arm64/1.21",

"mac/amd64/1.20",
"mac/amd64/1.21",
"mac/amd64/tip",

"mac/arm64/1.20",
"mac/arm64/1.21",
"mac/arm64/tip"
)

Expand Down Expand Up @@ -176,6 +177,12 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
arch
}
}
val dockerPlatformArch = when (arch) {
"arm64" -> "arm64/v8"
else -> {
dockerArch
}
}
dockerCommand {
name = "Pull Ubuntu"
commandType = other {
Expand All @@ -192,6 +199,7 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
--env TEAMCITY_VERSION=${'$'}TEAMCITY_VERSION
--env CI=true
--privileged
--platform linux/$dockerPlatformArch
$dockerArch/ubuntu:20.04
/delve/_scripts/test_linux.sh ${"go$version"} $arch
""".trimIndent()
Expand Down Expand Up @@ -221,6 +229,7 @@ class TestBuild(val os: String, val arch: String, version: String, buildId: Abso
when (arch) {
"386", "amd64" -> equals("teamcity.agent.jvm.os.arch", if (os == "mac") "x86_64" else "amd64")
"arm64" -> equals("teamcity.agent.jvm.os.arch", "aarch64")
"ppc64le" -> equals("teamcity.agent.jvm.os.arch", "ppc64le")
}
when (os) {
"linux" -> {
Expand Down
70 changes: 68 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,72 @@
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.

## [1.21.0] 2023-06-23

### Added

- Go 1.21 support (#3370, #3401, @aarzilli)
- Basic debug functionality for stripped executables (#3408, #3421, @derekparker)
- Core dumping on FreeBSD (#3305, @aarzilli)
- Ability to automatically attach to child processes when they are spawned (linux-only) (#3286, #3346, @aarzilli)
- Starlark scripts can now use the time module (#3375, @andreimatei)
- Online help for starlark interpreter (#3388, @aarzilli)
- `dlv trace` has a new option, `--timestamp`, that prints timestamps before every trace event (#3358, @spacewander)

### Fixed

- Stepping could hide normal breakpoint hits occurring simultaneously, in rare circumstances (#3287, @aarzilli)
- Internal error when defer locations can not be resolved (#3329, @aarzilli)
- Channels of certain types could be displayed incorrectly (#3362, @aarzilli)
- Formatted time wouldn't always be displayed when using DAP (#3349, @suzmue)
- Function call injection when parameters are in registers (#3365, @ZekeLu)
- Panic in Starlark interface when using partially loaded variables (#3386, @andreimatei)
- Use debug info directories configuration in `dlv trace` (#3405, @nozzy123nozzy)
- Updated DAP version (#3414, @suzmue)

### Changed

- Improved eBPF tracepoints (#3325, #3353, #3417, @chenhengqi, @derekparker)
- The name of the default output binary is now randomizes, which fixes some weird behavior when multiple instances of Delve are run simultaneously in the same directory (#3366, @aarzilli)
- Stderr of debuginfod-find is now suppressed (#3381, @fche)
- Better documentation for substitute-path (#3335, @aarzilli)
- `quit -c` will ask for confirmation when breakpoints still exist (#3398, @aarzilli)
- Miscellaneous improvements to documentation and tests (#3326, #3327, #3340, #3341, #3357, #3378, #3376, #3399, #3374, #3426, @alexandear, @cuishuang, @alexsaezm, @andreimatei)


## [1.20.2] 2023-04-05

### Added

- New flag --rr-onprocess-pid to replay command (#3281, @jcpowermac)
- Added documentation for watching arbitrary address (#3268, @felixge)
- Allow extracting a DWARF entry field (#3258, @brancz)
- Add SetLoggerFactory to terminal/logflags package (#3257, @blaubaer)
- New config option for tab printing when printing source code (#3243, @thockin)
- Added documentation for debugging Go runtime with Delve (#3234, @aarzilli)

### Fixed

- Fix printing boolean values in Starlark scripts (#3314, @vitalif)
- Fix infinite recursion in escapeCheck (#3311, @aarzilli)
- Support multiple functions with same name (#3297, @aarzilli)
- Handle end_seq in dwarf/line correctly (#3277, @derekparker)
- Fix calls into SYS_PROCESS_VM_READV/WRITEV syscalls (#3273, @aarzilli)
- Fix exit status for trace subcommand (#3263, @derekparker)
- Fix stripping DYLD_INSERT_LIBRARIES on macOS (#3245, @aviramha)
- Fix handling of list colors via config (#3240, @derekparker)
- Fixes to FreeBSD backend (#3224, @aarzilli)

### Changed

- Add limit to maximum time.Time we try and format (#3294, @aarzilli)
- Add fuzzing tests to expression evaluator and variable loader (#3293, @aarzilli)
- Removed some support for Go 1.12 and earlier (#3271, @aarzilli)
- Moved util functions to dwarf package (#3252, @alexandear)
- Attempt to load DW_AT_specification if present (#3247, @brancz)
- Match go test behavior when dlv test gets list of go files (#3232, @aarzilli)
- Populate Value field in pointer Variable (#3229, @andreimatei)

## [1.20.1] 2022-12-12

### Fixed
Expand Down Expand Up @@ -699,7 +765,7 @@ This project adheres to Semantic Versioning.
- Fix behavior of next/step/stepout in several edge-cases (invalid return addresses, no current goroutine, after process exists, inside unknown code, inside assembly files) (@aarzilli)
- Make sure the debugged executable we generated is deleted after exit (@alexbrainman)
- Make sure rr trace directories are deleted when we delete the executable and after tests (@aarzilli)
- Return errors for commands sent after the target process exited instead of panicing (@derekparker)
- Return errors for commands sent after the target process exited instead of panicking (@derekparker)
- Fixed typo in clear-checkpoint documentation (@iamzhout)

### Changed
Expand Down Expand Up @@ -745,7 +811,7 @@ This project adheres to Semantic Versioning.
- Windows: Handle delayed events (@aarzilli)
- Fix Println call to be Printf (@derekparker)
- Fix build on OSX (@koichi)
- Mark malformed maps as unreadable instead of panicing (@aarzilli)
- Mark malformed maps as unreadable instead of panicking (@aarzilli)
- Fixed broken benchmarks (@derekparker)
- Improve reliability of certain tests (@aarzilli)

Expand Down
29 changes: 19 additions & 10 deletions Documentation/backend_test_health.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
Tests skipped by each supported backend:

* 386 skipped = 7
* 1 broken
* 386 skipped = 6
* 3 broken - cgo stacktraces
* 3 not implemented
* arm64 skipped = 2
* 1 broken
* arm64 skipped = 1
* 1 broken - global variable symbolication
* darwin/arm64 skipped = 1
* 1 broken - cgo stacktraces
* darwin skipped = 1
* 1 waitfor implementation is delegated to debugserver
* darwin/arm64 skipped = 2
* 2 broken - cgo stacktraces
* darwin/lldb skipped = 1
* 1 upstream issue
* freebsd skipped = 4
* freebsd skipped = 6
* 2 flaky
* 4 not implemented
* linux/386/pie skipped = 1
* 1 broken
* linux/ppc64le skipped = 1
* 1 broken - cgo stacktraces
* linux/ppc64le/native skipped = 1
* 1 broken in linux ppc64le
* pie skipped = 2
* 2 upstream issue - https://github.com/golang/go/issues/29322
* windows skipped = 5
* ppc64le skipped = 11
* 6 broken
* 1 broken - global variable symbolication
* 4 not implemented
* windows skipped = 4
* 1 broken
* 3 see https://github.com/go-delve/delve/issues/2768
* 1 upstream issue
* windows/arm64 skipped = 2
* windows/arm64 skipped = 5
* 3 broken
* 1 broken - cgo stacktraces
* 1 broken - step concurrent
57 changes: 53 additions & 4 deletions Documentation/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Command | Description
[list](#list) | Show source code.
[source](#source) | Executes a file containing a list of delve commands
[sources](#sources) | Print list of source files.
[target](#target) | Manages child process debugging.
[transcript](#transcript) | Appends command output to a file.
[types](#types) | Print list of types

Expand Down Expand Up @@ -229,14 +230,24 @@ Changes the value of a configuration parameter.

config substitute-path <from> <to>
config substitute-path <from>
config substitute-path -clear

Adds or removes a path substitution rule.
Adds or removes a path substitution rule, if -clear is used all
substitute-path rules are removed. Without arguments shows the current list
of substitute-path rules.
See also [Documentation/cli/substitutepath.md](//github.com/go-delve/delve/tree/master/Documentation/cli/substitutepath.md) for how the rules are applied.

config alias <command> <alias>
config alias <alias>

Defines <alias> as an alias to <command> or removes an alias.

config debug-info-directories -add <path>
config debug-info-directories -rm <path>
config debug-info-directories -clear

Adds, removes or clears debug-info-directories.


## continue
Run until breakpoint or program termination.
Expand Down Expand Up @@ -375,7 +386,7 @@ Aliases: gr
## goroutines
List program goroutines.

goroutines [-u|-r|-g|-s] [-t [depth]] [-l] [-with loc expr] [-without loc expr] [-group argument] [-exec command]
goroutines [-u|-r|-g|-s] [-t [depth]] [-l] [-with loc expr] [-without loc expr] [-group argument] [-chan expr] [-exec command]

Print out info for every goroutine. The flag controls what information is shown along with each goroutine:

Expand All @@ -398,9 +409,14 @@ To only display goroutines where the specified location contains (or does not co
goroutines -w (userloc|curloc|goloc|startloc) expr
goroutines -without (userloc|curloc|goloc|startloc) expr
goroutines -wo (userloc|curloc|goloc|startloc) expr

Where:
userloc: filter by the location of the topmost stackframe in user code
curloc: filter by the location of the topmost stackframe (including frames inside private runtime functions)
goloc: filter by the location of the go instruction that created the goroutine
startloc: filter by the location of the start function

To only display goroutines that have (or do not have) the specified label key and value, use:


goroutines -with label key=value
goroutines -without label key=value
Expand All @@ -421,10 +437,27 @@ To only display user (or runtime) goroutines, use:
goroutines -with user
goroutines -without user

CHANNELS

To only show goroutines waiting to send to or receive from a specific channel use:

goroutines -chan expr

Note that 'expr' must not contain spaces.

GROUPING

goroutines -group (userloc|curloc|goloc|startloc|running|user)

Where:
userloc: groups goroutines by the location of the topmost stackframe in user code
curloc: groups goroutines by the location of the topmost stackframe
goloc: groups goroutines by the location of the go instruction that created the goroutine
startloc: groups goroutines by the location of the start function
running: groups goroutines by whether they are running or not
user: groups goroutines by weather they are user or runtime goroutines


Groups goroutines by the given location, running status or user classification, up to 5 goroutines per group will be displayed as well as the total number of goroutines in the group.

goroutines -group label key
Expand Down Expand Up @@ -526,7 +559,7 @@ Print contents of CPU registers.

regs [-a]

Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md.](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md.)
Argument -a shows more registers. Individual registers can also be displayed by 'print' and 'display'. See [Documentation/cli/expr.md](//github.com/go-delve/delve/tree/master/Documentation/cli/expr.md).


## restart
Expand Down Expand Up @@ -623,6 +656,22 @@ Step out of the current function.

Aliases: so

## target
Manages child process debugging.

target follow-exec [-on [regex]] [-off]

Enables or disables follow exec mode. When follow exec mode Delve will automatically attach to new child processes executed by the target process. An optional regular expression can be passed to 'target follow-exec', only child processes with a command line matching the regular expression will be followed.

target list

List currently attached processes.

target switch [pid]

Switches to the specified process.


## thread
Switch to the specified thread.

Expand Down
Loading

0 comments on commit 953b145

Please sign in to comment.