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

Cannot debug with dlv even when I'm using go 1.16 beta #43282

Closed
captain-corgi opened this issue Dec 19, 2020 · 6 comments
Closed

Cannot debug with dlv even when I'm using go 1.16 beta #43282

captain-corgi opened this issue Dec 19, 2020 · 6 comments

Comments

@captain-corgi
Copy link

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

$ go version
go version go1.16beta1 darwin/arm64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/anhle/Library/Caches/go-build"
GOENV="/Users/anhle/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/anhle/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/anhle/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.16beta1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2d/lk0l7f5d0bg0nqlsrthzr8c80000gn/T/go-build4118638698=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I just create a simple hello world golang project, and try to debug with Visual Studio Code - Exploration Version: 1.53.0-exploration
I'm able to run project without debugging, and it show that my go program running natively on my Macbook Air M1 (I viewed by Activity Monitor, and Architecture column shown "Apple".
I know that debugger is the job of dlv, so please tell me what should I do next. Thank you!

What did you expect to see?

I'm able to debug.

What did you see instead?

I cannot debug.

@captain-corgi captain-corgi changed the title Cannot debug with dlv event when I'm using go 1.16 beta Cannot debug with dlv even when I'm using go 1.16 beta Dec 19, 2020
@captain-corgi
Copy link
Author

I got this error:

dlv debug main.go
# runtime/cgo
gcc_arm64.S:28:16: error: brackets expression not supported on this target
 stp x29, x30, [sp, #-96]!
               ^
gcc_arm64.S:32:2: error: unknown use of instruction mnemonic without a size suffix
 mov x29, sp
 ^
gcc_arm64.S:34:16: error: brackets expression not supported on this target
 stp x19, x20, [sp, #80]
               ^
gcc_arm64.S:37:16: error: brackets expression not supported on this target
 stp x21, x22, [sp, #64]
               ^
gcc_arm64.S:40:16: error: brackets expression not supported on this target
 stp x23, x24, [sp, #48]
               ^
gcc_arm64.S:43:16: error: brackets expression not supported on this target
 stp x25, x26, [sp, #32]
               ^
gcc_arm64.S:46:16: error: brackets expression not supported on this target
 stp x27, x28, [sp, #16]
               ^
gcc_arm64.S:50:2: error: unknown use of instruction mnemonic without a size suffix
 mov x19, x0
 ^
gcc_arm64.S:51:2: error: unknown use of instruction mnemonic without a size suffix
 mov x20, x1
 ^
gcc_arm64.S:52:2: error: unknown use of instruction mnemonic without a size suffix
 mov x0, x2
 ^
gcc_arm64.S:54:2: error: invalid instruction mnemonic 'blr'
 blr x20
 ^~~
gcc_arm64.S:55:2: error: invalid instruction mnemonic 'blr'
 blr x19
 ^~~
gcc_arm64.S:57:16: error: brackets expression not supported on this target
 ldp x27, x28, [sp, #16]
               ^
gcc_arm64.S:60:16: error: brackets expression not supported on this target
 ldp x25, x26, [sp, #32]
               ^
gcc_arm64.S:63:16: error: brackets expression not supported on this target
 ldp x23, x24, [sp, #48]
               ^
gcc_arm64.S:66:16: error: brackets expression not supported on this target
 ldp x21, x22, [sp, #64]
               ^
gcc_arm64.S:69:16: error: brackets expression not supported on this target
 ldp x19, x20, [sp, #80]
               ^
gcc_arm64.S:72:16: error: brackets expression not supported on this target
 ldp x29, x30, [sp], #96
               ^
exit status 2
make: *** [debug] Error 1

@seankhliao
Copy link
Member

file an issue with delve: https://github.com/go-delve/delve

@captain-corgi
Copy link
Author

file an issue with delve: https://github.com/go-delve/delve

Thank you. I will get help from delve team.

@ianlancetaylor
Copy link
Contributor

This doesn't seem like something we can fix in the Go project proper, so if you have filed a bug with Delve I will close this bug. Please comment if that seems wrong.

@eaglemoor
Copy link

I have this error, when try use go test ./...

@davecheney
Copy link
Contributor

@eaglemoor please consult the delve project.

@golang golang locked as resolved and limited conversation to collaborators Jan 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants