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

debug/gosym: Table.Files doc is stale? #38754

Closed
bradfitz opened this issue Apr 29, 2020 · 2 comments
Closed

debug/gosym: Table.Files doc is stale? #38754

bradfitz opened this issue Apr 29, 2020 · 2 comments
Labels
Documentation FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bradfitz
Copy link
Contributor

https://golang.org/pkg/debug/gosym/#Table says:

    Files map[string]*Obj // nil for Go 1.2 and later binaries

But empirically that is not true. It's populated.

And https://golang.org/pkg/debug/gosym/#Obj.Paths says:

// Use the keys of Table.Files to obtain a list of source files.

... which further suggests it's meant to be non-nil.

/cc @randall77 @ianlancetaylor (not sure who owns this)

@bradfitz bradfitz added this to the Go1.15 milestone Apr 29, 2020
@bradfitz
Copy link
Contributor Author

Likewise, Obj docs says:

In Go 1.2, there is a single Obj for the entire program.

But https://golang.org/pkg/debug/gosym/#Table.Objs says:

Objs []Obj // nil for Go 1.2 and later binaries

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 29, 2020
@gopherbot
Copy link

Change https://golang.org/cl/230940 mentions this issue: debug/gosym: correct comments for Table.{Files,Objs}

xujianhai666 pushed a commit to xujianhai666/go-1 that referenced this issue May 21, 2020
The fields aren't too useful for Go 1.2 and later, but they aren't
actually nil.

Fixes golang#38754

Change-Id: Ia13a224f623697a00dea8ba0225633e1b9308c9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/230940
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants