File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 22# Exit if anything fails
33set -e
44
5+ # Prefer rustc in the same directory as this script
6+ DIR=" $( dirname " $0 " ) "
7+ if [ -x " $DIR /rustc" ]; then
8+ RUSTC=" $DIR /rustc"
9+ else
10+ RUSTC=" rustc"
11+ fi
12+
513# Find out where the pretty printer Python module is
6- RUSTC_SYSROOT=` rustc --print=sysroot`
14+ RUSTC_SYSROOT=" $( " $RUSTC " --print=sysroot) "
715GDB_PYTHON_MODULE_DIRECTORY=" $RUSTC_SYSROOT /lib/rustlib/etc"
816
917# Run GDB with the additional arguments that load the pretty printers
Original file line number Diff line number Diff line change @@ -31,8 +31,16 @@ icon to start your program running.
3131 exit 0
3232fi
3333
34+ # Prefer rustc in the same directory as this script
35+ DIR=" $( dirname " $0 " ) "
36+ if [ -x " $DIR /rustc" ]; then
37+ RUSTC=" $DIR /rustc"
38+ else
39+ RUSTC=" rustc"
40+ fi
41+
3442# Find out where the pretty printer Python module is
35- RUSTC_SYSROOT=` rustc --print=sysroot`
43+ RUSTC_SYSROOT=" $( " $RUSTC " --print=sysroot) "
3644GDB_PYTHON_MODULE_DIRECTORY=" $RUSTC_SYSROOT /lib/rustlib/etc"
3745
3846# Set the environment variable `RUST_GDB` to overwrite the call to a
You can’t perform that action at this time.
0 commit comments