go: cmd/link: missing debug_frame section if package plugin is imported
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version devel +00587e8 Fri Jan 26 23:55:04 2018 +0000 linux/amd64
but this also happens with the latest release candidate for 1.10.
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/a/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/a/n/go/"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build091711191=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Compile anything that imports plugin:
package main
import (
"plugin"
"fmt"
)
func main() {
test := plugin.Plugin{}
fmt.Println(test)
}
The executable used to have .debug_frame in 1.9 but has eh_frame now.
Was this done intentionally?
(originally reported as https://github.com/derekparker/delve/issues/1118)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 7
- Comments: 24 (9 by maintainers)
Commits related to this issue
- Makefile support for creating non-stripped builds with full debug support. (NB: Should be compatible with dlv when run under go 1.9, however due to https://github.com/golang/go/issues/23733 go 1.10 a... — committed to Danw33/go-build by Danw33 6 years ago
- plugin: disable plugins through tags Debugging Hydra in Go 1.10 and 1.11 (confirmed by one of its members), is not possible due to [this unresolved bug](https://github.com/golang/go/issues/23733) whi... — committed to glerchundi/hydra by glerchundi 6 years ago
- plugin: disable plugins through tags Debugging Hydra in Go 1.10 and 1.11 (confirmed by one of its members), is not possible due to [this unresolved bug](https://github.com/golang/go/issues/23733) whi... — committed to glerchundi/hydra by glerchundi 6 years ago
- config: disable plugin backend through 'noplugin' tag Debugging Hydra in Go 1.10 and 1.11 (confirmed by one of its members), is not possible due to [this unresolved bug](https://github.com/golang/go/... — committed to glerchundi/hydra by glerchundi 6 years ago
- config: disable plugin backend through 'noplugin' tag (#986) Debugging Hydra in Go 1.10 and 1.11 (confirmed by one of its members), is not possible due to [this unresolved bug](https://github.com/g... — committed to ory/hydra by glerchundi 6 years ago
- cmd/link: move type name mangling after deadcode elimination Moves type name mangling after deadcode elimination. The motivation for doing this is to create a space between deadcode elimination and t... — committed to golang/go by aarzilli 6 years ago
@vladbarosan We’ll do our best but to be honest we have few resources to improve the plugin development experience. Go is an open source project, and this is an area where external contributions would be very valuable.
Why is this issue closed? Seems like it is still a problem no?
Having the same problem after upgrading from golang10.0 to golang11.1
Please prioritize this as it blocks debugging applications with plugins.
@GodloveD it should be fixed in 1.12
I just try 1.9 works fine 1.10 and 1.11 has this kind of problem
I solved this problem by downgrading my GO version from 1.11 to 1.10.4. I’m on Ubuntu 16.4, and I fixed this problem by I deleting my
/usr/local/go
directory, downloading 1.10.4, then extracting withtar -C /usr/local -xzf go1.10.4.linux-amd64.tar.gz
. IntelliJ debugger worked fine afterwards. Hope this helps.