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

cmd/go : "-gcflags -S" doesn't work when binary is present #26884

Closed
ardan-bkennedy opened this issue Aug 9, 2018 · 1 comment
Closed

cmd/go : "-gcflags -S" doesn't work when binary is present #26884

ardan-bkennedy opened this issue Aug 9, 2018 · 1 comment

Comments

@ardan-bkennedy
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version go1.11beta3 darwin/amd64

Does this issue reproduce with the latest release?

Have not tried it on any other version.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/bill/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bill/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/p6/l5y36lvx3zvdc3gtfh0g_43w0000gn/T/go-build583566312=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Using this code
https://github.com/ardanlabs/gotraining/blob/master/topics/go/profiling/stack_trace/example1/example1.go

  1. I ask for the assembly listing and I get it.
    $ go build -gcflags -S

  2. I ask for it again and there is no output.

  3. I run go clean

  4. I ask for the assembly listing and I get it.

What did you expect to see?

I expect to get the assembly listing every time I run it without the need to issue go clean.

What did you see instead?

When the binary is present, the -S option is not working.

@ianlancetaylor
Copy link
Contributor

Closing as dup of #23877.

@golang golang locked and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants