delve/_fixtures/plugin2/plugin2.go
Alessandro Arzilli af1ffc8504 proc,proc/native,proc/gdbserial: initial plugin support (#1413)
Adds initial support for plugins, this is only the code needed to keep
track of loaded plugins on linux (both native and gdbserial backend).

It does not actually implement support for debugging plugins on linux.

Updates #865
2019-03-20 10:32:51 -07:00

34 lines
543 B
Go

package main
import (
"fmt"
"github.com/go-delve/delve/_fixtures/internal/pluginsupport"
)
func Fn2() string {
return "world"
}
type asomethingelse struct {
x, y float64
}
func (a *asomethingelse) Callback2(n, m int) float64 {
r := a.x + 2*a.y
r += float64(n) / float64(m)
return r
}
func TypesTest(s pluginsupport.Something) pluginsupport.SomethingElse {
if A != nil {
aIsNotNil(fmt.Sprintf("%s", A))
}
return &asomethingelse{1.0, float64(s.Callback(2))}
}
var A interface{}
func aIsNotNil(str string) {
// nothing here
}