ndk-stack工具使用

在ndk根目錄下,有個ndk-stack工具:html

1. 介紹:java

min@min-desktop:~/work/software/android-ndk-r10c$ ndk-stack 
Usage:
   ndk-stack -sym <path> [-dump <path>]
      -sym  Contains full path to the root directory for symbols.
      -dump Contains full path to the file containing the crash dump.
            This is an optional parameter. If ommited, ndk-stack will
            read input data from stdin
   See docs/NDK-STACK.html in your NDK installation tree for more details.

-sym <path>:表示包含符號連接的庫文件根目錄,如:APP_DIR/obj/local/armeabi/或APP_DIR/obj/local/armeabi/objs/serial_port/android

-dump <path>:表示包含log崩潰信息的日誌文件路徑。shell

2. 使用:工具

    通常狀況下,咱們直接使用以下命令捕獲crash信息:
spa

adb logcat | ndk-stack -sym APP_DIR/obj/local/armeabi/

    當咱們只有日誌文件時,需使用以下命令:
日誌

ndk-stack -sym APP_DIR/obj/local/armeabi/ -dump LOG_FILE
相關文章
相關標籤/搜索