Skip to content

Commit e6f6103

Browse files
committed
fix/improve compiler-debugging
1 parent 05084c6 commit e6f6103

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

src/compiler-debugging.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,36 @@ set `debug = true` in your config.toml.
1616

1717
Setting `debug = true` turns on many different debug options (e.g., `debug-assertions`,
1818
`debug-logging`, etc.) which can be individually tweaked if you want to, but many people
19-
simply set `debug = true`.
19+
simply set `debug = true`.
2020

2121
If you want to use GDB to debug rustc, please set `config.toml` with options:
2222

2323
```toml
2424
[rust]
2525
debug = true
26-
debuginfo-level = 2
27-
# WARNING: this will use a lot of disk space (about 35GB) and compile time.
28-
# Without debuginfo-level, you may also track the execution path, but lost
29-
# the symbol information for debugging.
26+
debuginfo-level = 2
3027
```
3128

32-
Default configuration will enable `symbol-mangling-version` v0, you need to install a GDB
33-
with version higher than 10.2, otherwise you need to disable new symbol-mangling-version.
29+
> NOTE:
30+
> This will use a lot of disk space
31+
> (upwards of <!-- date-check Aug 2022 --> 35GB),
32+
> and will take a lot more compile time.
33+
> With `debuginfo-level = 1` (the default when `debug = true`),
34+
> you will be able to track the execution path,
35+
> but will lose the symbol information for debugging.
36+
37+
The default configuration will enable `symbol-mangling-version` v0.
38+
This requires at least GDB v10.2,
39+
otherwise you need to disable new symbol-mangling-version in `config.toml`.
3440

3541
```toml
3642
[rust]
3743
new-symbol-mangling = false
3844
```
3945

40-
Check out the comments in config.toml.example for more info, you will need to rebuild the
41-
compiler once you've changed any configuration options.
46+
> See the comments in `config.toml.example` for more info.
47+
48+
You will need to rebuild the compiler after changing any configuration option.
4249

4350
## `-Z` flags
4451

0 commit comments

Comments
 (0)