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