Description: Hardcode GDB python module directory
 Debian package installs python modules into a fixed directory, so
 just hardcode path in wrapper script.
Author: Angus Lees <gus@debian.org>
Forwarded: not-needed

--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -13,11 +13,13 @@
 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"
+#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"

 # Run GDB with the additional arguments that load the pretty printers
-PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" gdb \
+PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec gdb \
   -d "$GDB_PYTHON_MODULE_DIRECTORY" \
   -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
   "$@"
