-
Notifications
You must be signed in to change notification settings - Fork 282
Description
NDK latest version (19.2.5345600)
gradle/externalNativeBuild/ndkBuild
host OS: Windows 10
compiler: clang
abi checked: arm*, x86*
stl c++_shared
NDK API level 26
device API level: 26-28 (emulator, Nexus 5X)
ASAN used with build + wrap.sh bundled
When wrap.sh is bundled with the apk, the AS debugger (native)/adb does not see any debuggable processes on the device. Therefore no debugging session can be started.
When wrap.sh is not bundled with the apk (just libclang_rt.asan-*.so), debugging session starts with no problem.
I use standard contents (generated by ndk-build) for wrap.sh:
#!/system/bin/sh
HERE="$(cd "$(dirname "$0")" && pwd)"
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
export LD_PRELOAD=$HERE/libclang_rt.asan-i686-android.so
$@