Android 打印backtrace

来源:互联网 发布:眼窝怎么变深知乎 编辑:程序博客网 时间:2024/06/16 21:50

Java:

    RuntimeException here = new RuntimeException("here");
  here.fillInStackTrace();
  Log.w(TAG, "Called: " + this, here);


C++:

   #include "utils/CallStack.h"

   CallStack stack(LOG_TAG);


Kernel:

    dump_stack();

0 0