mac下gdbserver调试程序
adb shell ps
准备工作
cd /libs/armeabi-v7a
adb remount
adb push gdbsever /system/bin
shell1:
adb root
adb shell
cd /data/local
./gdbserver :5055 --attach 342
shell2:
adb forward tcp:5055 tcp:5055
shell3:
cd /Users/Chaim/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin
./arm-linux-androideabi-gdb
set solib-search-path /Users/Chaim/Documents/workspace/aow/obj/local/armeabi-v7a
file /Users/Chaim/Documents/workspace/aow/obj/local/armeabi-v7a/libgame.so
directory /Users/Chaim/Documents/workspace/aow/Game
target remote :5055
其它调试指令:
bt
info threads
thread 1
list main
kill
break SelfUILayer.cpp:1102 thread all
break Class::Func
info break
delete 2
where
ndk-build参数:
-B V=1
NDK_DEBUG=1
adb shell ps
准备工作
cd /libs/armeabi-v7a
adb remount
adb push gdbsever /system/bin
shell1:
adb root
adb shell
cd /data/local
./gdbserver :5055 --attach 342
shell2:
adb forward tcp:5055 tcp:5055
shell3:
cd /Users/Chaim/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin
./arm-linux-androideabi-gdb
set solib-search-path /Users/Chaim/Documents/workspace/aow/obj/local/armeabi-v7a
file /Users/Chaim/Documents/workspace/aow/obj/local/armeabi-v7a/libgame.so
directory /Users/Chaim/Documents/workspace/aow/Game
target remote :5055
其它调试指令:
bt
info threads
thread 1
list main
kill
break SelfUILayer.cpp:1102 thread all
break Class::Func
info break
delete 2
where
ndk-build参数:
-B V=1
NDK_DEBUG=1