Commit Graph

12 Commits

Author SHA1 Message Date
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
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
Herby Gillot
d514b4c6e9
_scripts: add option to disable invoking git during build (#2798)
This is useful to be able to build using Delve's build scripts when
working from within a directory that has been extracted from a source tarball,
or wherever we wouldn't have git history.

This can be invoked as:

```
  go run _scripts/make.go build --no-git
```
2021-12-13 10:24:41 -08:00
Claus Lensbøl
4bcb8fb144
terminal/make: Add GOARCH and GOOS arguments (#2696)
This change adds '--GOARCH=[arch]' and '--GOOS=[os]' as arguments for
the make script to simplify the process of cross compilling.
2021-09-13 09:11:45 -07:00
Alessandro Arzilli
f3e76238e3
proc: move breakpoint condition evaluation out of backends (#2628)
* proc: move breakpoint condition evaluation out of backends

Moves breakpoint condition evaluation from the point where breakpoints
are set, inside ContinueOnce, to (*Target).Continue.

This accomplishes three things:

1. the breakpoint evaluation method needs not be exported anymore
2. breakpoint condition evaluation can be done with a full scope,
   containing a Target object, something that wasn't possible before
   because ContinueOnce doesn't have access to the Target object.
3. moves breakpoint condition evaluation out of the critical section
   where some of the threads of the target process might be still
   running.

* proc/native: handle process death during stop() on Windows

It is possible that the thread dies while we are inside the stop()
function. This results in an Access is denied error being returned by
SuspendThread being called on threads that no longer exist.

Delay the reporting the error from SuspendThread until the end of
stop() and only report it if the thread still exists at that point.

Fixes flakyness with TestIssue1101 that was exacerbated by moving
breakpoint condition evaluation outside of the backends.
2021-08-09 10:16:24 -07:00
Derek Parker
10406f96d5
*: Initial eBPF tracing support (#2625) 2021-07-31 17:16:26 +02:00
Koichi Shiraishi
7d343b6b7b
_scripts: support macOS Big Sur (#2437) 2021-04-17 12:33:33 +02: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
Alessandro Arzilli
8221250e65
split testing load between more CI services (#2251) 2020-12-16 08:56:15 -08:00
Alessandro Arzilli
f9c8f7f55b
Go 1.15 support (#2011)
* proc: start variable visibility one line after their decl line

In most cases variables shouldn't be visible on their declaration line
because they won't be initialized there.
Function arguments are treated as an exception.

This fix is only applied to programs compiled with Go 1.15 or later as
previous versions of Go did not report the correct declaration line for
variables captured by closures.

Fixes #1134

* proc: silence go vet error

* Makefile: enable PIE tests on windows/Go 1.15

* core: support core files for PIEs on windows

* goversion: add Go 1.15 to supported versions

* proc: fix function call injection for Go 1.15

Go 1.15 changed the call injection protocol so that the runtime will
execute the injected call on a different (new) goroutine.

This commit changes the function call support in delve to:

1. correctly track down the call injection state after the runtime
   switches to a different goroutine.
2. correctly perform the escapeCheck when stack values can come from
   multiple goroutine stacks.

* proc: miscellaneous fixed for call injection under macOS with go 1.15

- create copy of SP in debugCallAXCompleteCall case because the code
  used to assume that regs doesn't change
- fix automatic address calculation for function arguments when an
  argument has a spurious DW_OP_piece at entry
2020-07-28 09:19:51 -07:00
aarzilli
55543e2570 Makefile: reduce test timeout when TRAVIS==true
Reduces test timeout by one minute so that Go will timeout before
Travis-CI and report useful informations about the hang.
2020-04-17 09:20:55 -07:00
Derek Parker
85c34e47ee *: mv scripts _scripts
Instead of selectively excluding this directory, hide it from the go
tooling by applying the "_" prefix.
2020-03-28 20:28:51 +01:00