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

Code location information generated in trans::debuginfo is mostly incorrect #7715

Closed
michaelwoerister opened this issue Jul 11, 2013 · 3 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)

Comments

@michaelwoerister
Copy link
Member

Especially the file and line information generated for types is rather arbitrary as the span value is just passed to create_type_metadata() from the caller. So the type gets assigned the span of the local variable or argument that happens to be the first to be translated.

This should be easy fix by reading span information from the type definitions in the AST where it makes sense and to omit the span information otherwise.

@jdm
Copy link
Contributor

jdm commented Jul 11, 2013

Can't assign it to you due to github silliness, unfortunately.

@emberian
Copy link
Member

Triage bump. Still relevant, @michaelwoerister?

@michaelwoerister
Copy link
Member Author

Yes, still relevant but will probably be fixed soon together with namespace support.

@bors bors closed this as completed in 67ed30c Sep 11, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 28, 2021
Avoid needless heap allocation in box_collection

Fix issue left from previous PR

changelog: none.

r? `@Manishearth`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants