You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to debug an app that uses Go plugins and looks like it is not compatible mode
Please answer the following before submitting your issue:
dlv --listen=localhost:51140 --headless=true --api-version=2 --backend=lldb exec ./plugins_test could not launch process: decoding dwarf section info at offset 0x0: too short
What version of Delve are you using (dlv version)?
Delve Debugger
Version: 1.0.0
Build: v1.0.0
What version of Go are you using? (go version)?
go version go1.10 darwin/amd64
What operating system and processor architecture are you using?
macOS High Sierra
What did you do?
debug an application that uses plugins
What did you expect to see?
can debug the app
What did you see instead?
the debugger stops due to error
Example used
plugin/plugin.go package main import "fmt" var V int func F() { fmt.Printf("Hello, number %d\n", V) }
build as go build -buildmode=plugin
Trying to debug an app that uses Go plugins and looks like it is not compatible mode
Please answer the following before submitting your issue:
dlv --listen=localhost:51140 --headless=true --api-version=2 --backend=lldb exec ./plugins_test could not launch process: decoding dwarf section info at offset 0x0: too short
dlv version
)?Delve Debugger
Version: 1.0.0
Build: v1.0.0
go version
)?go version go1.10 darwin/amd64
macOS High Sierra
debug an application that uses plugins
can debug the app
the debugger stops due to error
Example used
plugin/plugin.go
package main import "fmt" var V int func F() { fmt.Printf("Hello, number %d\n", V) }
build as
go build -buildmode=plugin
main.go
`
package main
import "plugin"
func main() {
p, err := plugin.Open("plugin/plugin.so")
if err != nil {
panic(err)
}
v, err := p.Lookup("V")
if err != nil {
panic(err)
}
f, err := p.Lookup("F")
if err != nil {
panic(err)
}
*v.(*int) = 7
f.(func())()
}
`
The text was updated successfully, but these errors were encountered: