Go: debug could not find .debug_frame section in binary

Created on 30 Aug 2018  路  2Comments  路  Source: golang/go

Please answer these questions before submitting your issue. Thanks!

Please forgive me for my poor English.

What version of Go are you using (go version)?

1.11

Does this issue reproduce with the latest release?

1.11

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/lia/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/lia/go"
GOPROXY=""
GORACE=""
GOROOT="/home/lia/kaifagongjuji/Go_Language/go"
GOTMPDIR=""
GOTOOLDIR="/home/lia/kaifagongjuji/Go_Language/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build680534254=/tmp/go-build -gno-record-gcc-switches"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

Use InstelliJ idea debug go, Breakpoints cannot be used when exceptions occur.
idea version 2017.2.6

What did you expect to see?

Can be normal debug

What did you see instead?

could not find .debug_frame section in binary
could not find .debug_line section in binary

FrozenDueToAge

Most helpful comment

Same issue with MS Code, but reinstalling dlv helped me:
go get -u github.com/derekparker/delve/cmd/dlv

All 2 comments

Same issue with MS Code, but reinstalling dlv helped me:
go get -u github.com/derekparker/delve/cmd/dlv

This is expected; you need a modern version of Delve compiled with Go 1.11 to debug binaries built with 1.11.

cc @aarzilli @derekparker @dlsniper in case there's some prompt or warning that could be added, but unfortunately there's nothing we can do in Go itself to fix this.

Was this page helpful?
0 / 5 - 0 ratings