AOSP dump stack using CallStack.h
- copy content of
core
folder toproject_folder
/system
/core
/
-
include header
#include <dumpstack/dumpstack.h>;
-
call the function
dump_stack_android("LOG_TAG");
from a target place; -
add
-fvisibility=default
flag toLOCAL_CFLAGS
in the needed module(e.g. file
project_folder/system/bt/bta/Android.mk
LOCAL_CFLAGS += -fvisibility=default
) -
add library
libdumpstack
as dependency inLOCAL_SHARED_LIBRARIES
in main make file(e.g. file
project_folder/system/bt/main/Android.mk
LOCAL_SHARED_LIBRARIES += libdumpstack
)