Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlv does not work when app uses plugin #1133

Closed
troian opened this issue Feb 23, 2018 · 2 comments
Closed

dlv does not work when app uses plugin #1133

troian opened this issue Feb 23, 2018 · 2 comments

Comments

@troian
Copy link

troian commented Feb 23, 2018

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

  1. What version of Delve are you using (dlv version)?
    Delve Debugger
    Version: 1.0.0
    Build: v1.0.0
  2. What version of Go are you using? (go version)?
    go version go1.10 darwin/amd64
  3. What operating system and processor architecture are you using?
    macOS High Sierra
  4. What did you do?
    debug an application that uses plugins
  5. What did you expect to see?
    can debug the app
  6. 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

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())()
}
`

@dlsniper
Copy link
Contributor

Duplicate of #865

@aarzilli
Copy link
Member

Actually, duplicate of golang/go#23733, it would be a duplicate of #865 if it was still possible to implement support for plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants