Skip to content

Debuginfo level #333

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

Merged
merged 4 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/compiler-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ stack backtrace:
37: rustc_driver::run_compiler
```

If you want line numbers for the stack trace, you can enable
`debuginfo-level = 1` or `debuginfo-level = 2` in your config.toml and rebuild the
compiler. Then the backtrace will look like this:
If you want line numbers for the stack trace, you can enable `debug = true` in
your config.toml and rebuild the compiler (`debuginfo-level = 1` will also add
line numbers, but `debug = true` gives full debuginfo). Then the backtrace will
look like this:

```text
stack backtrace:
Expand Down
7 changes: 4 additions & 3 deletions src/how-to-build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ debug-assertions = true
# performance perhaps (less inlining) but it's worth it.
codegen-units = 0

# I always enable full debuginfo, however the line debuginfo (which is a more important part
# and enables e.g. line numbers in backtraces) is enabled by `debuginfo-level = 1` too.
debuginfo-level = 2
# This enables full debuginfo (`debuginfo-level = 2`). The line debuginfo (which is a
# more important part and enables e.g. line numbers in backtraces) is also enabled by
# `debuginfo-level = 1`.
debug = true
```

### What is `x.py`?
Expand Down