Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 2 additions & 6 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,7 @@ impl Step for DebuggerScripts {
cp_debugger_script("gdb_load_rust_pretty_printers.py");
cp_debugger_script("gdb_lookup.py");
cp_debugger_script("gdb_providers.py");
if builder.sess.unstable_features() {
cp_debugger_script("gdb_trim_paths.py");
}
cp_debugger_script("gdb_trim_paths.py");

// lldb debugger scripts
builder.install(
Expand All @@ -789,9 +787,7 @@ impl Step for DebuggerScripts {

cp_debugger_script("lldb_lookup.py");
cp_debugger_script("lldb_providers.py");
if builder.sess.unstable_features() {
cp_debugger_script("lldb_trim_paths.py");
}
cp_debugger_script("lldb_trim_paths.py");
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/etc/rust-gdb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ set -- \
-iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \
"$@"

# Unstable (nightly-only) trim-paths feature, activated only if
# - RUST_GDB_TRIM_PATHS=unstable is set
# - and if the python file is present (only shipped on nightly)
# Load Cargo trim-paths unremap files beside each loaded binary.
#
# Set RUST_GDB_TRIM_PATHS=0 to disable this feature.
GDB_TRIM_PATHS="$GDB_PYTHON_MODULE_DIRECTORY/gdb_trim_paths.py"
if [ "${RUST_GDB_TRIM_PATHS:-}" = "unstable" ] && [ -f "$GDB_TRIM_PATHS" ]; then
if [ "${RUST_GDB_TRIM_PATHS:-}" != "0" ] && [ -f "$GDB_TRIM_PATHS" ]; then
set -- -x "$GDB_TRIM_PATHS" "$@"
fi

Expand Down
8 changes: 4 additions & 4 deletions src/etc/rust-lldb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ fi

script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""

# Unstable (nightly-only) trim-paths feature, activated only if
# - RUST_LLDB_TRIM_PATHS=unstable is set
# - and if the python file is present (only shipped on nightly)
# Load Cargo trim-paths unremap files beside each loaded binary.
#
# Set RUST_LLDB_TRIM_PATHS=0 to disable this feature.
LLDB_TRIM_PATHS="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_trim_paths.py"
if [ "${RUST_LLDB_TRIM_PATHS:-}" = "unstable" ] && [ -f "$LLDB_TRIM_PATHS" ]; then
if [ "${RUST_LLDB_TRIM_PATHS:-}" != "0" ] && [ -f "$LLDB_TRIM_PATHS" ]; then
set -- --one-line-before-file "command script import \"$LLDB_TRIM_PATHS\"" "$@"
fi

Expand Down
Loading