Android C++ 打印(调用)堆栈

C++

Android 12

编译依赖库:

libutilscallstack

头文件:

#include <utils/CallStack.h>

代码:

CallStack stack;
stack.update();
stack.log("TAG");

打印calling pid

#include <binder/IPCThreadState.h>

IPCThreadState::self()->getCallingPid();		// 占位用%d

posted on 2023-11-13 19:05  luke4212  阅读(201)  评论(0编辑  收藏  举报

导航