先要编译出来一个可执行文件,具体步骤:
1、cd到目录:~/app/src/main/cpp/command下面
2、输入命令:make,不报错的话这里应该会有一个可执行文件出来,如下图:
3、gdb pinyinime_dictbuilder就可以了。
前一阵弄过,后来忘了,记录一下,我这里报错了
../share/dictbuilder.cpp:22:25: fatal error: android/log.h: No such file or directory
compilation terminated.
../share/dicttrie.cpp:20:25: fatal error: android/log.h: No such file or directory
compilation terminated.
../share/spellingtrie.cpp:19:25: fatal error: android/log.h: No such file or directory
compilation terminated.
Makefile:27: recipe for target 'pinyinime_dictbuilder' failed
make: *** [pinyinime_dictbuilder] Error 1
找不到log.h头文件,删了就行了
________________________________________________GDB命令相关________________________________________
打印数组:p *spl_buf@20 (数组名字spl_buf)
数组长度:p *array@len