-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/compile: Missing debug_info section on binaries produced by go run #24833
Comments
|
This is working as expected. If you want debug info, don't use |
I'm sorry but this is not expected. I'm using Go for a while and I was confused by it. As a user experience, this is not something that a user will understand. As such, I ask you to please reconsider this, as I don't see any arguments for stripping the debugging information in |
I'm sorry, but very few people are going to try to debug an app launched using |
Sorry for the late reply, I just noticed it. While I agree with you, on the other hand, there are efforts to actually make |
Just ran into the same kind user confusion with go-delve/delve#2844. I agree that this is not well known and that users generally expect |
Improving the documentation sounds like a good idea. |
What version of Go are you using (
go version
)?go version go1.10.1 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH=amd64
GOHOSTOS=windows
What did you do?
go run -gcflags="all=-N -l" main.go
The contents of
main.go
file:What did you expect to see?
I would expect the resulting binary to have the
.debug_info
section present.What did you see instead?
The debug info is not present, which means that Delve will fail with
decoding dwarf section info at offset 0x0: too short
.Using
objdump -h binary.exe | grep -i debug_info
also does not show any section present in the executable produced bygo run
but it's there forgo build -gcflags="all=-N -l"
.The text was updated successfully, but these errors were encountered: