1
Fork 0

Implement support for DWARF version 5.

DWARF version 5 brings a number of improvements over version 4. Quoting from
the announcement [1]:

> Version 5 incorporates improvements in many areas: better data compression,
> separation of debugging data from executable files, improved description of
> macros and source files, faster searching for symbols, improved debugging
> optimized code, as well as numerous improvements in functionality and
> performance.

On platforms where DWARF version 5 is supported (Linux, primarily), this commit
adds support for it behind a new `-Z dwarf-version=5` flag.

[1]: https://dwarfstd.org/Public_Review.php
This commit is contained in:
Patrick Walton 2022-06-20 16:26:51 -07:00
parent 45263fc66d
commit 1e0ad0c1d4
13 changed files with 59 additions and 21 deletions

View file

@ -1498,6 +1498,12 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
))
}
}
if let Some(dwarf_version) = sess.opts.debugging_opts.dwarf_version {
if dwarf_version > 5 {
sess.err(&format!("requested DWARF version {} is greater than 5", dwarf_version));
}
}
}
/// Holds data on the current incremental compilation session, if there is one.