mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
proc: allow simultaneous call injection to multiple goroutines (#1591)
* proc: allow simultaneous call injection to multiple goroutines Changes the call injection code so that we can have multiple call injections going on at the same time as long as they happen on distinct goroutines. * proc: fix EvalExpressionWithCalls for constant expressions The lack of address of constant expressions would confuse EvalExpressionWithCalls Fixes #1577
This commit is contained in:
committed by
Derek Parker
parent
55eed318fd
commit
dd4fd5dc9c
@ -1155,6 +1155,10 @@ func TestCallFunction(t *testing.T) {
|
||||
// Escape tests
|
||||
|
||||
{"escapeArg(&a2)", nil, errors.New("cannot use &a2 as argument pa2 in function main.escapeArg: stack object passed to escaping pointer: pa2")},
|
||||
|
||||
// Issue 1577
|
||||
{"1+2", []string{`::3`}, nil},
|
||||
{`"de"+"mo"`, []string{`::"demo"`}, nil},
|
||||
}
|
||||
|
||||
var testcases112 = []testCaseCallFunction{
|
||||
@ -1224,7 +1228,7 @@ func testCallFunction(t *testing.T, p proc.Process, tc testCaseCallFunction) {
|
||||
checkEscape = false
|
||||
}
|
||||
t.Logf("call %q", tc.expr)
|
||||
err := proc.EvalExpressionWithCalls(p, callExpr, pnormalLoadConfig, checkEscape)
|
||||
err := proc.EvalExpressionWithCalls(p, p.SelectedGoroutine(), callExpr, pnormalLoadConfig, checkEscape)
|
||||
if tc.err != nil {
|
||||
t.Logf("\terr = %v\n", err)
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user