518d1c
--- rustc-1.61.0-src/src/etc/rust-gdb.orig	2022-05-17 18:29:36.000000000 -0700
518d1c
+++ rustc-1.61.0-src/src/etc/rust-gdb	2022-05-18 11:18:13.732709661 -0700
518d1c
@@ -14,6 +14,9 @@ fi
518d1c
 RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
518d1c
 GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
518d1c
 
518d1c
+RUST_STD_BUILD="@BUILDDIR@/library/"
518d1c
+RUST_STD_SRC="$RUSTC_SYSROOT/lib/rustlib/src/rust/library/"
518d1c
+
518d1c
 # Run GDB with the additional arguments that load the pretty printers
518d1c
 # Set the environment variable `RUST_GDB` to overwrite the call to a
518d1c
 # different/specific command (defaults to `gdb`).
518d1c
@@ -21,4 +24,5 @@ RUST_GDB="${RUST_GDB:-gdb}"
518d1c
 PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
518d1c
   --directory="$GDB_PYTHON_MODULE_DIRECTORY" \
518d1c
   -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
518d1c
+  -iex "set substitute-path $RUST_STD_BUILD $RUST_STD_SRC" \
518d1c
   "$@"