File: rust-lldb

package info (click to toggle)
rustc 1.46.0+dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 269,876 kB
  • sloc: xml: 133,832; sh: 16,876; ansic: 16,844; javascript: 6,779; python: 6,128; cpp: 4,555; makefile: 3,186; asm: 1,392; ruby: 68; awk: 12
file content (34 lines) | stat: -rwxr-xr-x 884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

# Exit if anything fails
set -e

# Find the host triple so we can find lldb in rustlib.
host=$(rustc -vV | sed -n -e 's/^host: //p')

# Find out where to look for the pretty printer Python module
RUSTC_SYSROOT=$(rustc --print sysroot)
RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb"

lldb=lldb-10
if [ -f "$RUST_LLDB" ]; then
    lldb="$RUST_LLDB"
else
    if ! command -v "$lldb" > /dev/null; then
        echo "$lldb not found! Please install it." >&2
        exit 1
    else
        LLDB_VERSION=$("$lldb" --version | cut -d ' ' -f3)

        if [ "$LLDB_VERSION" = "3.5.0" ]; then
            cat << EOF >&2
***
WARNING: This version of LLDB has known issues with Rust and cannot display the contents of local variables!
***
EOF
        fi
    fi
fi

# Call LLDB with the commands added to the argument list
exec "$lldb" --source-before-file ./lldb_commands "$@"