mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 20:33:23 +00:00
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
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
|
|
@@ -11,7 +11,7 @@
|
|
fi
|
|
|
|
# Find out where the pretty printer Python module is
|
|
-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
|
|
+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
|
|
--- a/src/etc/rust-gdbgui
|
|
+++ b/src/etc/rust-gdbgui
|
|
@@ -40,7 +40,7 @@
|
|
fi
|
|
|
|
# Find out where the pretty printer Python module is
|
|
-RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
|
|
+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"
|
|
|
|
# Set the environment variable `RUST_GDB` to overwrite the call to a
|