In Android, I want get the trace that call processgroup.DoKillProcessGroupOnce()
, but I don't know how to use the CallStack.
#include <utils/CallStack.h>
static int DoKillProcessGroupOnce(const char* cgroup, uid_t uid, int initialPid, int signal) {
android::CallStack::logStack("TRACE1");
But the log says that TRACE1: CallStack::logStackInternal
is not linked.
It seems that: reinterpret_cast<uintptr_t>(getCurrentInternal) == 0
#ifdef WEAKS_AVAILABLE
static CallStackUPtr ALWAYS_INLINE getCurrent(int32_t ignoreDepth = 1) {
if (reinterpret_cast<uintptr_t>(getCurrentInternal) == 0) { //>>>>>>>
ALOGW("CallStack::getCurrentInternal not linked, returning null");
return CallStackUPtr(nullptr);
} else {
return getCurrentInternal(ignoreDepth);
}
}
I really need some help about how to get backtrace in processgroup.cpp
.