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

rustc needs a way to remap filenames in debug info #39067

Closed
jsgf opened this issue Jan 14, 2017 · 2 comments
Closed

rustc needs a way to remap filenames in debug info #39067

jsgf opened this issue Jan 14, 2017 · 2 comments

Comments

@jsgf
Copy link
Contributor

jsgf commented Jan 14, 2017

Right now, rustc records its current directory and each literal pathname passed to it in the debug information. This is usually what we want.

However, if rustc is being used in build infrastructure where the actual directory and pathnames differ from the "canonical" ones, it would be useful to be able to remap the pathnames into the canonical form in the debug info, so that they're useful for debugging.

gcc and clang have the -fdebug-prefix-map=old=new option, which matches each source path against the old prefix and remaps it to new in the debug info (non-matching paths are unchanged). I think we can copy this design, with a -C debug-prefix-map=<old>=<new> (though I'm not thrilled that it can't deal with paths with an = in them).

@hanna-kruppe
Copy link
Contributor

Duplicate of #38322

@jsgf
Copy link
Contributor Author

jsgf commented Jan 14, 2017

I searched, but I guess I missed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants