Skip to content

Commit a6bf8be

Browse files
dmakarovLucasSte
authored andcommitted
[SOL] Fix paths in solana lldb wrapper script
1 parent 8de2c4e commit a6bf8be

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

lldb/scripts/solana/solana-lldb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
here=$(dirname "$0")
6+
lldb=${here}/lldb
7+
if ! command -v "$lldb" > /dev/null; then
8+
echo "LLDB not found!" >&2
9+
exit 1
10+
else
11+
LLDB_VERSION=$("$lldb" --version | cut -d ' ' -f3)
12+
13+
if [ "$LLDB_VERSION" = "3.5.0" ]; then
14+
cat << EOF >&2
15+
***
16+
WARNING: This version of LLDB has known issues with Rust and cannot display the contents of local variables!
17+
***
18+
EOF
19+
fi
20+
fi
21+
22+
script_import_rust="command script import \"${here}/lldb_lookup.py\""
23+
script_import_solana="command script import \"${here}/solana_lookup.py\""
24+
commands_file_rust="${here}/lldb_commands"
25+
commands_file_solana="${here}/solana_commands"
26+
27+
# Call LLDB with the commands added to the argument list
28+
"$lldb" --one-line-before-file "$script_import_rust" --one-line-before-file "$script_import_solana" --source-before-file "$commands_file_rust" --source-before-file "$commands_file_solana" "$@"

0 commit comments

Comments
 (0)