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/link: DW_AT_name should come from source code #13949

ribrdb opened this issue Jan 14, 2016 · 0 comments

cmd/link: DW_AT_name should come from source code #13949

ribrdb opened this issue Jan 14, 2016 · 0 comments


Copy link

@ribrdb ribrdb commented Jan 14, 2016

gc is not generating DW_AT_name according to the spec.
DW_AT_name is "a string representing the name as it appears in the source program."
Mangled names should go in DW_AT_linkage_name.
I've seen names like these:
package.functioname for functions
package.(type).functionname for methods
package.functioname.func1 for closures
package.type for types

These should all be the linkage_name.

We should probably represent packages as DW_TAG_namespace. Functions and types should be children of the package. Methods should be children of the type. Anonymous functions should only have a linkage_name and not a DW_AT_name.

It would also be good to fix variables to represent what's in the source, e.g. no '&foo'.

@bradfitz bradfitz added this to the Unplanned milestone Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.