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

Open
ribrdb opened this issue Jan 14, 2016 · 0 comments
Open

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

ribrdb opened this issue Jan 14, 2016 · 0 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@ribrdb
Copy link
Contributor

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
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
None yet
Development

No branches or pull requests

4 participants