--- /dev/null
+# rust-installer stuff, not relevant for Debian
+usr/lib/rustlib/components
+usr/lib/rustlib/install.log
+usr/lib/rustlib/manifest-*
+usr/lib/rustlib/rust-installer-version
+usr/lib/rustlib/uninstall.sh
+
+# docs, we already install into /usr/share/doc/rustc
+usr/share/doc/rust/*
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
-@@ -11,8 +11,10 @@
+@@ -11,7 +11,7 @@
fi
# Find out where the pretty printer Python module is
-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
--GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+#RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-+#GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
-+# We can just hardcode this on Debian, and remove the rustc dependency
-+GDB_PYTHON_MODULE_DIRECTORY="/usr/share/rust-gdb"
++RUSTC_SYSROOT="$(if type "$RUSTC" 2>/dev/null; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
+ GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
# Run GDB with the additional arguments that load the pretty printers
- # Set the environment variable `RUST_GDB` to overwrite the call to a
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
-@@ -10,7 +10,7 @@
- RUSTC_SYSROOT=$(rustc --print sysroot)
+@@ -7,10 +7,10 @@
+ host=$(rustc -vV | sed -n -e 's/^host: //p')
+
+ # Find out where to look for the pretty printer Python module
+-RUSTC_SYSROOT=$(rustc --print sysroot)
++RUSTC_SYSROOT="$(if type "$RUSTC" 2>/dev/null; then "$RUSTC" --print=sysroot; else echo /usr; fi)"
RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"
-lldb=lldb
if [ -f "$RUST_LLDB" ]; then
lldb="$RUST_LLDB"
else
-@@ -30,8 +30,8 @@
- fi
- fi
-
--script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
--commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
-+script_import="command script import \"/usr/share/rust-lldb/lldb_lookup.py\""
-+commands_file="/usr/share/rust-lldb/lldb_commands"
-
- # Call LLDB with the commands added to the argument list
- exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
-src/etc/rust-gdb usr/bin/
-src/etc/gdb_* usr/share/rust-gdb/
-src/etc/rust_types.py usr/share/rust-gdb/
+usr/bin/rust-gdb
+usr/bin/rust-gdbgui
+usr/lib/rustlib/etc/gdb_load_rust_pretty_printers.py
+usr/lib/rustlib/etc/gdb_lookup.py
+usr/lib/rustlib/etc/gdb_providers.py
-src/etc/rust-lldb usr/bin/
-src/etc/lldb_* usr/share/rust-lldb/
-src/etc/rust_types.py usr/share/rust-lldb/
+usr/bin/rust-lldb
+usr/lib/rustlib/etc/lldb_commands
+usr/lib/rustlib/etc/lldb_lookup.py
+usr/lib/rustlib/etc/lldb_providers.py
usr/bin/rustc
usr/bin/rustdoc
+usr/lib/rustlib/etc/rust_types.py
debian/architecture.mk usr/share/rustc/