service,terminal: APIv2 plus method to select API version (#460)

New API version with better backwards compatibility plus mechanism to
select the API version that a headless instance should use.

Adds service/test/cmd/typecheckrpc.go to type check the RPC interface.
This commit is contained in:
Alessandro Arzilli
2016-04-18 21:20:20 +02:00
committed by Derek Parker
parent f37a26d525
commit af4798e2a9
22 changed files with 2331 additions and 175 deletions

View File

@ -7,7 +7,6 @@ import (
"testing"
"github.com/derekparker/delve/proc"
"github.com/derekparker/delve/service"
"github.com/derekparker/delve/service/api"
protest "github.com/derekparker/delve/proc/test"
@ -646,19 +645,3 @@ func TestUnsafePointer(t *testing.T) {
}
})
}
func TestIssue406(t *testing.T) {
withTestClient("issue406", t, func(c service.Client) {
locs, err := c.FindLocation(api.EvalScope{-1, 0}, "issue406.go:146")
assertNoError(err, t, "FindLocation()")
_, err = c.CreateBreakpoint(&api.Breakpoint{Addr: locs[0].PC})
assertNoError(err, t, "CreateBreakpoint()")
ch := c.Continue()
state := <-ch
assertNoError(state.Err, t, "Continue()")
v, err := c.EvalVariable(api.EvalScope{-1, 0}, "cfgtree")
assertNoError(err, t, "EvalVariable()")
vs := v.MultilineString("")
t.Logf("cfgtree formats to: %s\n", vs)
})
}