Rollup merge of #144738 - bjorn3:remove_omit_gdb_pretty_printer_section, r=jieyouxu
Remove the omit_gdb_pretty_printer_section attribute Disabling loading of pretty printers in the debugger itself is more reliable. Before this commit the .gdb_debug_scripts section couldn't be included in dylibs or rlibs as otherwise there is no way to disable the section anymore without recompiling the entire standard library.
This commit is contained in:
commit
3823f0bc07
120 changed files with 209 additions and 387 deletions
|
|
@ -203,6 +203,8 @@ pub struct TestProps {
|
|||
pub add_core_stubs: bool,
|
||||
/// Whether line annotatins are required for the given error kind.
|
||||
pub dont_require_annotations: HashSet<ErrorKind>,
|
||||
/// Whether pretty printers should be disabled in gdb.
|
||||
pub disable_gdb_pretty_printers: bool,
|
||||
}
|
||||
|
||||
mod directives {
|
||||
|
|
@ -251,6 +253,7 @@ mod directives {
|
|||
pub const ADD_CORE_STUBS: &'static str = "add-core-stubs";
|
||||
// This isn't a real directive, just one that is probably mistyped often
|
||||
pub const INCORRECT_COMPILER_FLAGS: &'static str = "compiler-flags";
|
||||
pub const DISABLE_GDB_PRETTY_PRINTERS: &'static str = "disable-gdb-pretty-printers";
|
||||
}
|
||||
|
||||
impl TestProps {
|
||||
|
|
@ -306,6 +309,7 @@ impl TestProps {
|
|||
has_enzyme: false,
|
||||
add_core_stubs: false,
|
||||
dont_require_annotations: Default::default(),
|
||||
disable_gdb_pretty_printers: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -654,6 +658,12 @@ impl TestProps {
|
|||
self.dont_require_annotations
|
||||
.insert(ErrorKind::expect_from_user_str(err_kind.trim()));
|
||||
}
|
||||
|
||||
config.set_name_directive(
|
||||
ln,
|
||||
DISABLE_GDB_PRETTY_PRINTERS,
|
||||
&mut self.disable_gdb_pretty_printers,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
|
|||
"check-stdout",
|
||||
"check-test-line-numbers-match",
|
||||
"compile-flags",
|
||||
"disable-gdb-pretty-printers",
|
||||
"doc-flags",
|
||||
"dont-check-compiler-stderr",
|
||||
"dont-check-compiler-stdout",
|
||||
|
|
|
|||
|
|
@ -259,7 +259,9 @@ impl TestCx<'_> {
|
|||
Some(version) => {
|
||||
println!("NOTE: compiletest thinks it is using GDB version {}", version);
|
||||
|
||||
if version > extract_gdb_version("7.4").unwrap() {
|
||||
if !self.props.disable_gdb_pretty_printers
|
||||
&& version > extract_gdb_version("7.4").unwrap()
|
||||
{
|
||||
// Add the directory containing the pretty printers to
|
||||
// GDB's script auto loading safe path
|
||||
script_str.push_str(&format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue