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

Support column information #257

Closed
est31 opened this issue Oct 16, 2019 · 3 comments · Fixed by #367
Closed

Support column information #257

est31 opened this issue Oct 16, 2019 · 3 comments · Fixed by #367

Comments

@est31
Copy link
Member

est31 commented Oct 16, 2019

Right now, backtrace::Symbol contains information about line and file name. This is all that libbacktrace supplies. However, gimli supports reading column information as well. Symbol should get a function column(&self) -> Option<u32> that, if gimli is being used, returns the column, otherwise None.

@retep998
Copy link
Member

retep998 commented Aug 6, 2020

Note that Windows dbghelp also provides column numbers, although dbghelp calls it "displacement". Most of the functions that are called which provide the line number also provide the displacement but that parameter is currently ignored.

@est31
Copy link
Member Author

est31 commented Aug 6, 2020

@retep998 good point, but note that currently rustc doesn't emit column information on windows. It sets them to zero because emitting them would create bad effects with VS studio. See rust-lang/rust#42921

If LLVM gained an API to specify a full span containing start and end positions, one could think about enabling it again (or if the VS studio bugs got fixed, idk maybe by now they are).

@eggyal
Copy link
Contributor

eggyal commented Aug 7, 2020

Not sure whether the bugs are fixed yet in MS debuggers, but as at writing Clang still omits column info for MSVC targets.

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

Successfully merging a pull request may close this issue.

3 participants