Skip to content

Commit 3de529d

Browse files
authored
Rollup merge of rust-lang#76015 - ortem:fix-lldb-script, r=Mark-Simulacrum
Fix loading pretty-printers in rust-lldb script Pretty-printers loading in `rust-lldb` script was broken in rust-lang#72357 This fixes rust-lang#76006
2 parents 214a80b + 9cdcfe2 commit 3de529d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/bootstrap/dist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ impl Step for DebuggerScripts {
647647

648648
cp_debugger_script("lldb_lookup.py");
649649
cp_debugger_script("lldb_providers.py");
650+
cp_debugger_script("lldb_commands")
650651
}
651652
}
652653
}

src/etc/lldb_commands

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\"
21
type synthetic add -l lldb_lookup.synthetic_lookup -x \".*\" --category Rust
32
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^(alloc::([a-z_]+::)+)String$\" --category Rust
43
type summary add -F lldb_lookup.summary_lookup -e -x -h \"^&str$\" --category Rust

src/etc/rust-lldb

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ EOF
3030
fi
3131
fi
3232

33+
script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
34+
commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
35+
3336
# Call LLDB with the commands added to the argument list
34-
exec "$lldb" --source-before-file ./lldb_commands "$@"
37+
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"

0 commit comments

Comments
 (0)