закешированный к нам в целях безопасности дебаггер
Go to file
Alessandro Arzilli c30a333f7b proc: allow function calls to appear inside an expression (#1503)
The initial implementation of the 'call' command required the
function call to be the root expression, i.e. something like:

	double(3) + 1

was not allowed, because the root expression was the binary operator
'+', not the function call.

With this change expressions like the one above and others are
allowed.

This is the first step necessary to implement nested function calls
(where the result of a function call is used as argument to another
function call).

This is implemented by replacing proc.CallFunction with
proc.EvalExpressionWithCalls. EvalExpressionWithCalls will run
proc.(*EvalScope).EvalExpression in a different goroutine. This
goroutine, the 'eval' goroutine, will communicate with the main
goroutine of the debugger by means of two channels: continueRequest
and continueCompleted.

The eval goroutine evaluates the expression recursively, when
a function call is encountered it takes care of setting up the
function call on the target program and writes a request to the
continueRequest channel, this causes the 'main' goroutine to restart
the target program by calling proc.Continue.

Whenever Continue encounters a breakpoint that belongs to the
function call injection protocol (runtime.debugCallV1 and associated
functions) it writes to continueCompleted which resumes the 'eval'
goroutine.

The 'eval' goroutine takes care of implementing the function call
injection protocol.

When the expression is fully evaluated the 'eval' goroutine will
write a special message to 'continueRequest' signaling that the
expression evaluation is terminated which will cause Continue to
return to the user.

Updates #119
2019-05-09 08:29:58 -07:00
_fixtures proc: allow function calls to appear inside an expression (#1503) 2019-05-09 08:29:58 -07:00
assets Add high-res images 2015-05-19 12:25:26 -05:00
cmd/dlv cmd/dlv: add Go version check (#1533) 2019-04-26 10:24:21 -07:00
Documentation cmd/dlv: add Go version check (#1533) 2019-04-26 10:24:21 -07:00
pkg proc: allow function calls to appear inside an expression (#1503) 2019-05-09 08:29:58 -07:00
scripts *: Update import name to github.com/go-delve/delve 2019-01-04 19:43:13 +01:00
service proc: allow function calls to appear inside an expression (#1503) 2019-05-09 08:29:58 -07:00
vendor tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -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 git: Update gitignore 2015-10-20 20:55:11 -07:00
.travis.yml travis.yml: add 1.12 to test matrix (#1498) 2019-02-26 08:52:13 -08:00
appveyor.yml *: Missed go-delve renames 2019-01-04 11:21:33 -08:00
CHANGELOG.md Set release date for 1.2.0 2019-02-19 11:15:57 -08:00
CONTRIBUTING.md Update CONTRIBUTING.md 2016-05-13 10:43:09 +08:00
glide.lock *: Update vendor 2018-06-22 09:45:10 +02:00
glide.yaml *: Update vendor 2018-06-22 09:45:10 +02:00
go.mod tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
go.sum tests: fix typecheckrpc.go and convert it to a test 2019-01-07 11:47:49 -08:00
ISSUE_TEMPLATE.md misc: Include issue template for GitHub 2016-03-03 10:40:14 -08:00
LICENSE Add License and README 2014-05-03 15:31:52 -05:00
Makefile Makefile: replace makefile with a script 2018-09-18 12:06:25 -07:00
README.md doc/readme: Fix 'Github' spelling (#1524) 2019-03-26 16:15:18 -07:00

Delve

license GoDoc Build Status Build status Join the chat at https://gitter.im/go-delve/delve

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.