File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 2
2
# Exit if anything fails
3
3
set -e
4
4
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
+
5
13
# Find out where the pretty printer Python module is
6
- RUSTC_SYSROOT=` rustc --print=sysroot`
14
+ RUSTC_SYSROOT=" $( " $RUSTC " --print=sysroot) "
7
15
GDB_PYTHON_MODULE_DIRECTORY=" $RUSTC_SYSROOT /lib/rustlib/etc"
8
16
9
17
# 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.
31
31
exit 0
32
32
fi
33
33
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
+
34
42
# Find out where the pretty printer Python module is
35
- RUSTC_SYSROOT=` rustc --print=sysroot`
43
+ RUSTC_SYSROOT=" $( " $RUSTC " --print=sysroot) "
36
44
GDB_PYTHON_MODULE_DIRECTORY=" $RUSTC_SYSROOT /lib/rustlib/etc"
37
45
38
46
# Set the environment variable `RUST_GDB` to overwrite the call to a
You can’t perform that action at this time.
0 commit comments