summaryrefslogtreecommitdiff
path: root/user/rust/0013-Move-debugger-scripts-to-usr-share-rust.patch
blob: a401dc5abe979e3d8f8fbf0d5fcb484b426e4c51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 17bb016bf9eefb42e1205b5f8d7b944147337f24 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:09:10 +0000
Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust

---
 src/bootstrap/dist.rs | 2 +-
 src/etc/rust-gdb      | 2 +-
 src/etc/rust-lldb     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 0c6e213110..1858fade71 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -583,7 +583,7 @@ impl Step for DebuggerScripts {
     fn run(self, builder: &Builder) {
         let host = self.host;
         let sysroot = self.sysroot;
-        let dst = sysroot.join("lib/rustlib/etc");
+        let dst = sysroot.join("share/rust");
         t!(fs::create_dir_all(&dst));
         let cp_debugger_script = |file: &str| {
             builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 23ba93da8e..dc51b16c57 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -4,7 +4,7 @@ set -e
 
 # Find out where the pretty printer Python module is
 RUSTC_SYSROOT=`rustc --print=sysroot`
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
 
 # Run GDB with the additional arguments that load the pretty printers
 # Set the environment variable `RUST_GDB` to overwrite the call to a
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
index 424302d495..460e119210 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -26,7 +26,7 @@ display the contents of local variables!"
 fi
 
 # Prepare commands that will be loaded before any file on the command line has been loaded
-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_rust_formatters.py\""
 category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust"
 category_enable="type category enable Rust"
 
-- 
2.21.0