d-rust-lldb-paths
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Wed, 25 Jul 2018 04:35:56 +0000 (05:35 +0100)
committerXimin Luo <infinity0@debian.org>
Wed, 25 Jul 2018 04:35:56 +0000 (05:35 +0100)
Gbp-Pq: Name d-rust-lldb-paths

src/etc/rust-lldb

index f70ab65bce717044d448d893c445339268293795..61adff473081ed3445769ca3c863343497c3d06b 100755 (executable)
@@ -12,7 +12,7 @@
 # Exit if anything fails
 set -e
 
-LLDB_VERSION=`lldb --version 2>/dev/null | head -1 | cut -d. -f1`
+LLDB_VERSION=`lldb-6.0 --version 2>/dev/null | head -1 | cut -d. -f1`
 
 if [ "$LLDB_VERSION" = "lldb-350" ]
 then
@@ -29,13 +29,10 @@ TMPFILE=`mktemp /tmp/rust-lldb-commands.XXXXXX`
 # Make sure to delete the tempfile no matter what
 trap "rm -f $TMPFILE; exit" INT TERM EXIT
 
-# Find out where to look for the pretty printer Python module
-RUSTC_SYSROOT=`rustc --print sysroot`
-
 # Write the LLDB script to the tempfile
-echo "command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\"" >> $TMPFILE
+echo "command script import \"/usr/share/rust-lldb/lldb_rust_formatters.py\"" >> $TMPFILE
 echo "type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust" >> $TMPFILE
 echo "type category enable Rust" >> $TMPFILE
 
 # Call LLDB with the script added to the argument list
-lldb --source-before-file="$TMPFILE" "$@"
+lldb-6.0 --source-before-file="$TMPFILE" "$@"