DBG_ARMEABI_LIBS := ./libs/armeabi
DBG_ARMEABI_OBJ := ./obj/local/armeabi
DBG_MOUDLE_NAME := Ls
DBG_MOUDLE_SYSMBOL := $(DBG_ARMEABI_OBJ)/Ls
DBG_SERVER := gdbserver
INSTALL_PATH := /data/local/tmp
listen:
adb push $(DBG_ARMEABI_LIBS)/$(DBG_SERVER) $(INSTALL_PATH)
adb shell chmod 777 $(INSTALL_PATH)/$(DBG_SERVER)
adb push $(DBG_MOUDLE_SYSMBOL) $(INSTALL_PATH)
adb shell chmod 777 $(INSTALL_PATH)/$(DBG_MOUDLE_NAME)
adb shell $(INSTALL_PATH)/$(DBG_SERVER) 127.0.0.1:5566 $(INSTALL_PATH)/$(DBG_MOUDLE_NAME)
debug:
adb forward tcp:5566 tcp:5566
arm-linux-androideabi-gdb.exe $(DBG_MOUDLE_SYSMBOL)
target remote localhost:5566
在工程目录:
图片.png
创建makefile
先开一个控制台 make listen 等待
再开一个控制台 make debug 链接
网友评论