закешированный к нам в целях безопасности дебаггер
Go to file
Joel Sing 9c5777e762
pkg/proc: fix and improve freebsd register handling (#3019)
* pkg/proc: convert freebsd ptrace code to cgo

There is little point in having cgo call a custom C function, when the same
can be done directly from cgo (with less code and effort). Split the amd64
specific code into ptrace_freebsd_amd64.go. Also avoid mixing C.ptrace()
with syscall.SYS_PTRACE.

This will make further changes easier - no functional change intended.

* pkg/proc: check return values of ptrace calls on freebsd

The return values of the PT_GETNUMLWPS and PT_GETLWPLIST ptrace calls were
previously unchecked. While these should not fail, panic instead of using
-1 with slice allocation/handling.

* pkg/proc: return *amd64util.AMD64Xstate from freebsd ptraceGetRegset

Return a pointer to a struct, rather than a struct - this simplifies the
code in both the caller and the ptraceGetRegset function, while also avoiding
struct copying.

* pkg/proc: fix floating point register setting on freebsd

The original code could never work - PT_SETREGS on freebsd does not
take an iovec, nor does it set FP registers. Furthermore, the xsave
bytes were not stored in the amd64util.AMD64Xstate struct.

Updates #3001

* pkg/proc: re-enable function call injection on freebsd

Floating point registers can now be set and restored correctly.

This is a partial revert of 51090f003bace1f8cc37b8480ffdb6f6cc91fa5a.

Fixes #3001

* pkg/proc: deduplicate register setting code on freebsd
2022-05-31 16:04:36 -07:00
_fixtures proc: fix RFLAGS corruption after call injection on amd64 (#3002) 2022-05-05 08:41:40 -07:00
_scripts proc/native: fix Windows build (#3023) 2022-05-31 16:03:57 -07:00
.teamcity Updates for go1.18beta1 (#2831) 2021-12-22 10:26:21 -08:00
assets Add high-res images 2015-05-19 12:25:26 -05:00
cmd/dlv dap: remote attach must not use terminateDebuggee in single-client launch mode (#2995) 2022-05-18 12:23:47 +02:00
Documentation Documentation: document substitute-path more (#2998) 2022-05-04 11:01:56 -07:00
pkg pkg/proc: fix and improve freebsd register handling (#3019) 2022-05-31 16:04:36 -07:00
service proc,service: represent logical breakpoints explicitly (#2946) 2022-05-25 13:58:26 -07:00
testcase terminal/colorize: avoid print multiple package by accidently ast.Node startPos==token.NoPos (#2898) 2022-02-10 09:50:31 -08:00
vendor go.mod: require go-delve/liner instead of peterh/liner (#2905) 2022-02-14 18:42:43 +01:00
.cirrus.yml proc: fixes concerning call injection on freebsd and rr (#3000) 2022-05-05 08:39:54 -07:00
.deepsource.toml Continuous Integration cleanup (#2369) 2021-03-08 09:35:56 -08:00
.gitattributes makefile: use git's $Id$ instead of setting ver.Build in makefile (#807) 2017-04-28 10:14:33 -07:00
.gitignore *: Replace libbpfgo with cilium/ebpf (#2771) 2021-11-03 16:58:04 +01:00
CHANGELOG.md v1.8.3 Changelog (#2988) 2022-04-25 09:04:42 -07:00
CONTRIBUTING.md README: Remove gitter chat link. 2020-01-21 09:06:53 -08:00
go.mod go.mod: require go-delve/liner instead of peterh/liner (#2905) 2022-02-14 18:42:43 +01:00
go.sum go.mod: require go-delve/liner instead of peterh/liner (#2905) 2022-02-14 18:42:43 +01:00
ISSUE_TEMPLATE.md Documentation: document substitute-path more (#2998) 2022-05-04 11:01:56 -07:00
LICENSE Add License and README 2014-05-03 15:31:52 -05:00
Makefile pkg/proc: add build scripts & docker image for ebpf (#2847) 2021-12-30 09:04:59 +01:00
README.md Documentation: remove individual os install instruction links (#2697) 2021-09-13 10:55:06 +02:00

Delve

license GoDoc Build Status

The GitHub issue tracker is for bugs only. Please use the developer mailing list for any feature proposals and discussions.

About Delve

Delve is a debugger for the Go programming language. The goal of the project is to provide a simple, full featured debugging tool for Go. Delve should be easy to invoke and easy to use. Chances are if you're using a debugger, things aren't going your way. With that in mind, Delve should stay out of your way as much as possible.