From: Angus Lees Date: Tue, 29 Mar 2022 11:23:46 +0000 (+0100) Subject: Hardcode GDB python module directory X-Git-Tag: archive/raspbian/1.59.0+dfsg1-1_deb11u3+rpi1~1^2^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d6daf40a784cf16170f781d40c7c4f97b90044cb;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