-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsymbolizer
More file actions
executable file
·41 lines (33 loc) · 832 Bytes
/
symbolizer
File metadata and controls
executable file
·41 lines (33 loc) · 832 Bytes
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
35
36
37
38
39
40
41
#!/bin/bash
ndkversion="24.0.8215888"
libname="asanexample"
# default arch
arch="arm64-v8a"
POSITIONAL_ARGS=()
if [ $# -eq 0 ]; then
echo "Pass an address as the last argument, use -a to provide architecture"
exit 0
fi
while [[ $# -gt 0 ]]; do
case $1 in
-a|--arch)
arch="$2"
shift # past argument
shift # past value
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
*)
POSITIONAL_ARGS+=("$1") # save positional arg
shift # past argument
;;
esac
done
if [ ${#POSITIONAL_ARGS[@]} -eq 0 ]; then
echo "Pass an address as the last argument"
exit 1
fi
cd "$(dirname "$0")"
$ANDROID_HOME/ndk/$ndkversion/toolchains/llvm/prebuilt/*/bin/llvm-symbolizer --obj=app/build/intermediates/cmake/sanitize/obj/$arch/lib$libname.so ${POSITIONAL_ARGS[0]}