Commit Graph

12 Commits

Author SHA1 Message Date
hengwu0
3f7571ec30 proc: implement stacktrace of arm64 (#1780)
* proc: separate amd64-arch code

separate amd64 code about stacktrace, so we can add arm64 stacktrace code.

* proc: implemente stacktrace of arm64

* delve now can use stack, frame commands on arm64-arch debug.

Co-authored-by: tykcd996 <tang.yuke@zte.com.cn>
Co-authored-by: hengwu0 <wu.heng@zte.com.cn>

* test: remove skip-code of stacktrace on arm64

* add LR DWARF register and remove skip-code for fixed tests

* proc: fix the Continue command after the hardcoded breakpoint on arm64

Arm64 use hardware breakpoint, and it will not set PC to the next instruction like amd64. We should move PC in both runtime.breakpoints and hardcoded breakpoints(probably cgo).

* proc: implement cgo stacktrace on arm64

* proc: combine amd64_stack.go and arm64_stack.go file

* proc: reorganize the stacktrace code

* move SwitchStack function arch-related
* fix Continue command after manual stop on arm64
* add timeout flag to make.go to enable infinite timeouts

Co-authored-by: aarzilli <alessandro.arzilli@gmail.com>
Co-authored-by: hengwu0 <wu.heng@zte.com.cn>

Co-authored-by: tykcd996 <56993522+tykcd996@users.noreply.github.com>
Co-authored-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
2020-01-21 09:11:20 -08:00
hengwu0
da2028dcdf test: fix tests on arm64
* remove skip-code of some arm64 tests, which implemented.
* fix errors in testsuits for arm64
2019-11-27 11:07:31 -08:00
hengwu0
f88899ea97 proc/native: fix SetCurrentBreakpoint on arm64
arm64 use hardware breakpoint, and it will not set PC to the next instruction like amd64. Let adjustPC always fasle in arm64, in case of infinite loop.
2019-11-27 11:07:31 -08:00
Alessandro Arzilli
4fc8528997 proc/linux: do not route signals to threads while stopping (#1752)
* proc/linux: do not route signals to threads while stopping

While we are trying to stop the process we should not route signals
sent to threads because that will result in threads being resumed.
Also keep better track of which threads are stopped.

This fixes an incompatibility with Go 1.14, which sends a lot of
signals to its threads to implement non-cooperative preemption,
resulting in Delve hanging waiting for an already-stopped thread to
stop.

In principle however this bug has nothing to do with Go 1.14 and could
manifest in any instance of high signal pressure.

* Makefile: discard stderr of "go list"

In module mode "go" will print messages about downloading modules to
stderr, we shouldn't confuse them for the real command output.
2019-11-12 06:58:54 -08:00
chainhelen
58a7c84e01 scripts: Add 'make uninstall' command
This change adds the `make uninstall` command which will uninstall delve.
2019-09-13 11:17:28 +02:00
Derek Parker
cf7a2d7a25 scripts: Prefer 'go mod vendor'
Remove dependancy on glide and instead switch completely over to using
`go mod vendor` as our vendor solution.
2019-07-09 08:49:46 +02:00
Derek Parker
4c9a72e486 *: Update import name to github.com/go-delve/delve
The repository is being switched from the personal account
github.com/derekparker/delve to the organization account
github.com/go-delve/delve. This patch updates imports and docs, while
preserving things which should not be changed such as my name in the
CHANGELOG and in TODO comments.
2019-01-04 19:43:13 +01:00
aarzilli
d0f0a872a7 Documentation,Makefile: better error when gencert.sh fails
Fixes #1378
2018-10-18 09:47:29 -07:00
aarzilli
74c98bc961 proc: support position independent executables (PIE)
Support for position independent executables (PIE) on the native linux
backend, the gdbserver backend on linux and the core backend.
Also implemented in the windows native backend, but it can't be tested
because go doesn't support PIE on windows yet.
2018-10-11 11:21:27 -07:00
aarzilli
910f90c3c8 proc/native,Makefile: allow compiling on macOS without native backend
On macOS 10.14 Apple changed the command line tools so that system
headers now need to be manually installed.

Instead of adding one extra install step to the install procedure add a
build tag to allow compilation of delve without the native backend on
macOS. By default (i.e. when using `go get`) this is how delve will be
compiled on macOS, the make script is changed to enable compiling the
native backend if the required dependencies have been installed.

Insure that both configuration still build correctly on Travis CI and
change the documentation to describe how to compile the native backend
and that it isn't normally needed.

Fixes #1359
2018-10-02 10:46:09 -07:00
Kevin Cantwell
4e9ba9a7b5 Fix scripts/make.go for darwin
Correctly locates the installed executable path for darwin
2018-09-25 11:50:24 -07:00
aarzilli
087431f029 Makefile: replace makefile with a script
We were using our makefile not for the intended purpose of makefiles
but to multiplex a series of small scripts.
We can easily achieve the same result in a more reasonable programming
language and as a bonus we don't need to install a version of make on
windows anymore.
Additionally our test script had become fairly complicated and will
become even more complicated when testing of PIE buildmode is
introduced.
Allows the tests to run on Windows without having to install Mingw
(although we still want it installed so that we can run cgo tests on
Windows).

Fixes building when GOPATH isn't set.

Fixes #759
2018-09-18 12:06:25 -07:00