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

doc: ref/gdb should mention compiler flags / go install -gcflags #3363

Closed
the42 opened this issue Mar 21, 2012 · 14 comments
Closed

doc: ref/gdb should mention compiler flags / go install -gcflags #3363

the42 opened this issue Mar 21, 2012 · 14 comments

Comments

@the42
Copy link

the42 commented Mar 21, 2012

The Documentation of Debugging Go Code
(eg. http://tip.golang.org/ref/gdb)
should mention the -N and -l* flags. Both are useful (and in case of a consistent
picture on local variables) essential.

As the go tool has settled it would also make sense to mention

go build|install|... -gcflags '-N -l'

(Btw. the documentation does mention the "-s" flag to omit debug info, so it
should mention the others influencing debug behavior too)
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added priority-go1, removed priority-triage.

@rsc
Copy link
Contributor

rsc commented Mar 26, 2012

Comment 2:

You need -a for these to really take effect.
And you need -a again when they get undone.
Assigning to adg to do or postpone.

Owner changed to @adg.

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Mar 26, 2012

Comment 3:

Labels changed: added priority-later, removed priority-go1.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 4:

Labels changed: added go1.1.

@minux
Copy link
Member

minux commented Oct 1, 2012

Comment 5:

revision be7e338a8960 (also in release branch) already mentions
the required -gcflags, should this issue be regarded as fixed?

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 6:

Labels changed: added size-m.

@nightlyone
Copy link
Contributor

Comment 7:

What about adding a -debug flag to the build related list of flags? That might also ease
maintaining all the required knobs.

@the42
Copy link
Author

the42 commented Apr 1, 2013

Comment 8:

A good idea as long as the optimisation knobs remain that limited, which
nobody can envision.
Think of gcc --debug: there are some safe settings, whereas others only
make sense when knowing the optimisation settings.
I would rather like to see a go debug, which sets the corresponding knobs
and invokes the platform default debuger, in case of an unambiguous main.
Am 01.04.2013 12:23 schrieb <go@googlecode.com>:

@robpike
Copy link
Contributor

robpike commented Apr 3, 2013

Comment 9:

Marking as after Go 1.1. The main topic of the issue is resolved.

Labels changed: removed go1.1.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 10:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 11:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 12:

Labels changed: added repo-main.

@robpike
Copy link
Contributor

robpike commented Mar 5, 2014

Comment 13:

Labels changed: added gdb.

@the42 the42 assigned adg Mar 5, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@adg adg removed their assignment May 27, 2016
@odeke-em
Copy link
Member

odeke-em commented Feb 8, 2020

Thank you for the report and for the patience @the42, as well as others for the triage and responses.

So that page no longer exists, but now we’ve got references for “Debugging with GDB” https://golang.org/doc/gdb#Introduction as well as “Diagnostics” and under the section “Debugging” https://golang.org/doc/diagnostics.html?h=gdb#debugging where we mention -gcflags=‘-N -l’
BD5B06C2-F772-4050-A28A-D89F30702E3B
E499BA69-41C6-4F1B-A658-415AED256D00

Thus I shall close this issue.

@odeke-em odeke-em closed this as completed Feb 8, 2020
@golang golang locked and limited conversation to collaborators Feb 7, 2021
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

9 participants