diff --git a/_fixtures/issue528.go b/_fixtures/issue528.go new file mode 100644 index 0000000000000000000000000000000000000000..635edd3675b96335fb4dca155d5cbb3d87690e29 --- /dev/null +++ b/_fixtures/issue528.go @@ -0,0 +1,12 @@ +package main + +import ( + "fmt" + "github.com/peterh/liner" +) + +func main() { + line := liner.NewLiner() + line.Close() + fmt.Printf("test\n") +} diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go index d8d36c94ef5120158a502ac672956ba4b0400e2e..6f79856f974502ef8256956be09b83f828aceefd 100644 --- a/service/test/integration2_test.go +++ b/service/test/integration2_test.go @@ -4,13 +4,13 @@ import ( "fmt" "math/rand" "net" + "os" "path/filepath" "runtime" "strconv" "strings" "testing" "time" - "os" protest "github.com/derekparker/delve/proc/test" @@ -1100,3 +1100,20 @@ func TestEvalExprName(t *testing.T) { } }) } + +func TestClientServer_Issue528(t *testing.T) { + // FindLocation with Receiver.MethodName syntax does not work + // on remote package names due to a bug in debug/gosym that + // Was fixed in go 1.7 // Commit that fixes the issue in go: + // f744717d1924340b8f5e5a385e99078693ad9097 + + ver, _ := proc.ParseVersionString(runtime.Version()) + if ver.Major > 0 && !ver.AfterOrEqual(proc.GoVersion{1, 7, 0, 0, 0}) { + t.Log("Test skipped") + return + } + + withTestClient2("issue528", t, func(c service.Client) { + findLocationHelper(t, c, "State.Close", false, 1, 0) + }) +}