From: Angus Lees Date: Thu, 14 Jul 2022 11:17:39 +0000 (+0200) Subject: Hardcode GDB python module directory X-Git-Tag: archive/raspbian/1.63.0+dfsg1-2_deb10u2+rpi1^2^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5a3d6957fefbd4e048ff86198a1d79007105fc74;p=rustc-mozilla.git Hardcode GDB python module directory Forwarded: not-needed Debian package installs python modules into a fixed directory, so just hardcode path in wrapper script. Gbp-Pq: Name d-rust-gdb-paths --- diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb index b950cea79..5ec875258 100755 --- a/src/etc/rust-gdb +++ b/src/etc/rust-gdb @@ -11,7 +11,7 @@ else fi # Find out where the pretty printer Python module is -RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" +RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; 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 diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui index 9744913b6..613737dbe 100755 --- a/src/etc/rust-gdbgui +++ b/src/etc/rust-gdbgui @@ -40,7 +40,7 @@ else fi # Find out where the pretty printer Python module is -RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)" +RUSTC_SYSROOT="$(if type "$RUSTC" >/dev/null 2>&1; then "$RUSTC" --print=sysroot; else echo /usr; fi)" GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc" # Set the environment variable `RUST_GDB` to overwrite the call to a