Commit Graph

2018 Commits

Author SHA1 Message Date
Alessandro Arzilli
6a70d531bb
proc/*: implement proc.(*compositeMemory).WriteMemory (#2271)
Delve represents registerized variables (fully or partially) using
compositeMemory, implementing proc.(*compositeMemory).WriteMemory is
necessary to make SetVariable and function calls work when Go will
switch to using the register calling convention in 1.17.

This commit also makes some refactoring by moving the code that
converts between register numbers and register names out of pkg/proc
into a different package.
2021-03-04 10:28:28 -08:00
nd
3088b8b579
TeamCity: add mac/arm64 build and use DelveBot account (#2368) 2021-03-04 18:38:56 +01:00
derekparker
62d52e78d4 TeamCity change in 'Delve' project: copy of 'go-delve/delve' VCS root was created 2021-03-03 19:06:12 +00:00
Alessandro Arzilli
5534839ff7
TeamCity: select latest patch version of go for mac builds (#2363)
Also adds a disabled tip builder for the next-version support branch.
2021-03-01 08:23:05 -08:00
polinasok
2e80b32c41
service/dap: avoid double removal of temp built binary (#2335)
* Avoid double removal of temp binary

* Add back accidentally removed empty line

* Simplify regex

* Use unique build output directories in test cases

* Recover TestLaunchDebugRequest hidden logging and refine error check

* Special case access-denied error on Windows

* Remove special case for access denied on Windows

* Increase remove delay on Win

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-02-24 08:19:07 -08:00
Alessandro Arzilli
92fb175192
TeamCity: add linux/arm64/tip and disable failing arm64 tests (#2359)
* TeamCity: add linux/arm64/tip configuration

So that it can be tested when we make the next-version-support-branch.

* tests: disable failing cgo tests on arm64
2021-02-24 08:18:23 -08:00
Dmitry Neverov
5360c62869 TeamCity: fix go dist link on mac 2021-02-24 10:27:41 +01:00
Dmitry Neverov
56afd507e4 TeamCity: set execution timeout so that builds don't hang if agents are not available 2021-02-24 10:27:30 +01:00
Alessandro Arzilli
a6685247e0
proc/native: correctly read g address on linux/arm64 (#2343)
When cgo is used the address of the g struct is saved on the special
register TPIDR_EL0. Because executing C code could overwrite the
contents of R28 that normally contains the address of g we should read
it from TPIDR_EL0 instead when runtime.iscgo is set.
2021-02-23 12:38:52 -08:00
Dmitry Neverov
d196b7ddfc Run linux/386 builds only on amd64 agents 2021-02-23 20:03:04 +01:00
polinasok
129a9fe46c
service/dap: detect and report unloaded variables (#2353)
* Detect and report unloaded variables

* Make DeepSource happy

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-02-23 08:29:06 -08:00
Alessandro Arzilli
946f9d7bd4
TeamCity: fix mac test script name (#2354) 2021-02-23 08:20:34 -08:00
nd
9ff5bb49c7
Fix linux/arm64 docker image name (#2355) 2021-02-23 08:19:59 -08:00
nd
baa580b626
Add mac/amd64 & linux/arm64 builders (#2349)
* Add mac/amd64 build

* Set arch requirements for all builds

* Add linux/arm64 build
2021-02-23 11:16:23 +01:00
Alessandro Arzilli
d739cb04e3
test: increase num of frames examined by TestClientServer_FullStacktrace (#2334)
When the runtime is allocating memory the stack trace needed to reach
user code might be greater than 10 frames.
2021-02-22 13:31:06 -08:00
polinasok
54d0d56b9e
Add binary removal delay on Windows to avoid access denied (#2351)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-02-21 11:17:14 -08:00
Alessandro Arzilli
780bcac9cc
Documentation: update install instructions (#2352)
Remove OS specific install instructions that all repeat the same thing.
Since `go get ...` is being deprecated (to install executables)
recommend an install procedure that works on all supported versions of
go (`git clone && go install`) but also mention the new `go install`
mode in 1.16.
2021-02-21 11:04:55 -08:00
polinasok
540e63a55e
Include optional breakpoint info in setBreakpoints responses to reliably populate the UI (#2347)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-02-21 08:02:42 -08:00
polinasok
98728d8fe1
service/dap: improve test coverage for evaluateName feature based on known vscode-go bugs (#2341)
* DAP test for github.com/golang/vscode-go/issues/1056

* DAP test for github.com/golang/vscode-go/issues/884

* DAP test for github.com/golang/vscode-go/issues/851

* DAP test for github.com/golang/vscode-go/issues/1053

* DAP test for github.com/golang/vscode-go/issues/1054

* Make DeepSource happy

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-02-21 08:00:05 -08:00
Alessandro Arzilli
8a8e540fa6
teamcity,goversion: drop Go version 1.13 from test matrix (#2345)
Go 1.16 has been released.
2021-02-21 07:58:56 -08:00
Mark Eibes
3269d7a120
service/dap: Update server.go (#2350) 2021-02-21 10:30:04 +01:00
Armin Becher
32a45afa09
Fix broken link to JSON-RPC (#2348) 2021-02-21 07:48:12 +01:00
Alessandro Arzilli
c068861f95
locspec,proc: improve documentation (#2338)
* Reformat pkg/locspec documentation so that it is formatted correctly
  by godoc/pkgsite
* Unexport some types and variables in proc that don't need to be
  exported.
2021-02-10 09:31:37 -08:00
Chris Hines
74223baf90
*: Update link to Go extension for VS Code (#2336) 2021-02-05 15:05:55 -08:00
Alessandro Arzilli
2c1a822632
terminal,service,proc/*: adds dump command (gcore equivalent) (#2173)
* proc/core: off-by-one error reading ELF core files

core.(*splicedMemory).ReadMemory checked the entry interval
erroneously when dealing with contiguous entries.

* terminal,service,proc/*: adds dump command (gcore equivalent)

Adds the `dump` command that creates a core file from the target process.

Backends will need to implement a new, optional, method `MemoryMap` that
returns a list of mapped memory regions.
Additionally the method `DumpProcessNotes` can be implemented to write out
to the core file notes describing the target process and its threads. If
DumpProcessNotes is not implemented `proc.Dump` will write a description of
the process and its threads in a OS/arch-independent format (that only Delve
understands).

Currently only linux/amd64 implements `DumpProcessNotes`.

Core files are only written in ELF, there is no minidump or macho-o writers.

# Conflicts:
#	pkg/proc/proc_test.go
2021-01-29 13:39:33 -08:00
Alessandro Arzilli
11e4ed2bf9
proc/core: off-by-one error reading ELF core files (#2333)
core.(*splicedMemory).ReadMemory checked the entry interval
erroneously when dealing with contiguous entries.
2021-01-29 13:39:04 -08:00
Alessandro Arzilli
f19d5e5c13
proc: fix embedded field search (#2320)
Both structMember and findMethod implemented a depth-first search in
embedded fields but the Go specification requires a breadth-first
search. They also allowed promotion of fields in the concrete type of
embedded interfaces even though this is not allowed by Go.
Furthermore they both lacked protection from infinite recursion
when a type embeds itself and the user requests a non-existent field.

Fixes #2316
2021-01-29 09:25:31 -08:00
Than McIntosh
dceffacb89
pkg/proc: fix for file reference handling with DWARF 5 compilation units (#2327)
Add a helper method for collecting line table file references that
does the correct thing for DWARF 5 vs DWARF 4 (in the latter case you
have an implicit 0 entry which is the comp dir, whereas in the former
case you do not). This is to avoid out-of-bounds errors when examining
the file table section of a DWARF 5 compilation unit's line table.

Included is a new linux/amd-only test that includes a precompiled C
object file with a DWARF-5 section that triggers the bug in question.

Fixes #2319
2021-01-29 09:23:52 -08:00
Alessandro Arzilli
7548542795
all: bump version and release notes (#2331)
Thank you to: @andreimatei, @hitzhangjie, @dlsniper, @nd, @polinasok,
@oxisto, @zamai, @artspb.
2021-01-28 13:42:42 -08:00
Alessandro Arzilli
8e91d3b0bf
terminal: Go syntax highlighting for listings (#2294)
Fixes #1273
2021-01-28 07:08:14 -08:00
Alessandro Arzilli
c40774d3d4
proc: refactor common code in WriteBreakpoint (#2300)
Moves common backend code in WriteBreakpoint to
proc.(*Target).SetBreakpoint.
2021-01-27 07:27:54 -08:00
Alessandro Arzilli
f5d5a681d0
proc: do not assume abstract origins precede their uses (#2293)
The DWARF standard does not say that a DW_ATTR_abstract_origin can only
reference entries that appear before it, this change fixes BinaryInfo
to comply. See #2284 for an example of this happening.
2021-01-27 06:58:48 -08:00
Alessandro Arzilli
3c86d68a99
proc: remove dead code (#2321) 2021-01-27 06:54:50 -08:00
Alessandro Arzilli
fa016faa52
proc: correctly format ARM64 floating point registers (#2289)
Fixes #2198

Co-authored-by: du.jinze <du.jinze@zte.com.cn>
2021-01-26 10:37:47 -08:00
Alessandro Arzilli
fc9e0be8e7
tests: changes to investigate TestClientServer_FullStacktrace errors (#2236)
Changs TestClientServer_FullStacktrace and
Test1ClientServer_FullStacktrace to log more information, also removes
code from TestFrameEvaluation that could mask the error.

Updates #2231
2021-01-26 10:07:06 -08:00
Derek Parker
3d0a93c58f *: Remove linux builders from GH matrix
Removes linux builders from the GitHub action matrix. These are covered
via the TeamCity CI solution now.
2021-01-26 16:59:40 +01:00
Alessandro Arzilli
8a78568f8c
Fix .teamcity/settings.kts (#2325)
Add missing comma.
2021-01-26 06:44:13 -08:00
Alessandro Arzilli
715224cea0
Change TeamCity test matrix and drop appveyor/travis-ci configurations (#2315)
* TeamCity: change test matrix and test scripts

Changes test matrix to test:

* 1.13 through 1.16 on linux/amd64
* 1.15, 1.16 on windows/amd64
* 1.15 on linux/386

Also includes tests on go-tip for windows/amd64 and linux/amd64
(currently disabled, but can be turned on in a PR).

Changes test scripts to automatically select the latest patch version
of Go.

* CI: remove Travis-CI and Appveyor configuration
2021-01-25 20:48:27 -08:00
aarzilli
25178e265f TeamCity change in 'Delve' project: 'https://github.com/aarzilli/delve' VCS root was removed 2021-01-20 20:22:55 +00:00
aarzilli
3dfd18c693 TeamCity change in 'Delve (matrix change test)' project: 'https://github.com/aarzilli/delve' VCS root was created 2021-01-20 20:17:47 +00:00
Alessandro Arzilli
0593a1cebc
cmd/dlv/tests: fix TestGeneratedDoc on Windows (#2314)
Change TestGeneratedDoc to ignore differences in line terminators.
2021-01-20 09:40:03 -08:00
nd
27f66762d0
Fix compilation error in TC settings (#2313) 2021-01-20 14:49:11 +01:00
nd
9c03e2b5de
Fixing branch selection in TeamCity builds (#2311)
* Enable pull-requests in all builds

Otherwise test builds always use the master branch

* Apply change in settings made in UI
2021-01-20 14:02:58 +01:00
hitzhangjie
9030fc837b
service: examinemem outputs wrong starting address (#2309) 2021-01-20 08:55:16 +01:00
Artem Khvastunov
eb8becfb56
use SVG TeamCity icon (#2306) 2021-01-19 12:58:54 -08:00
derekparker
6a3a08b8aa TeamCity change in 'Delve' project: build features of 'Aggregator' build configuration were updated 2021-01-19 19:50:38 +00:00
Artem Khvastunov
fe9ce7b148
change GitHub user from 'artspb' to 'derekparker' in TeamCity DSL (#2307) 2021-01-18 15:51:29 -08:00
Artem Khvastunov
f2ec3e49a8
Introduce TeamCity builds (#2298)
* add -json flag when running tests on TeamCity

* introduce TeamCity builds

* restore gdbserial constants for 386

Otherwise compilation fails.

* skip TestAttachRequest on Windows as it never finishes

* run tests on 1.16beta1
2021-01-18 07:48:06 -08:00
polinasok
82fcd2cb26
service/dap: Add support for evaluateName for variables (#2292)
* Add support for evaluateName for variables

* More evaluateName logic tweaks and tests

* Make DeepSource happy

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-01-14 10:53:12 -08:00
polinasok
1b2357092c
cmd: update dlv dap --help (#2299)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-01-13 13:10:15 +01:00