More libbacktrace fixes.
Included in minor fix ups is the addition of a warning macro to replace
all of the ALOGW calls.
Fix a race where multiple threads could be attempting to unwind the threads
of the current process at the same time.
Bug: 8410085
Change-Id: I02a65dc778dde690e5f95fc8ff069a32d0832fd1
diff --git a/libbacktrace/Backtrace.h b/libbacktrace/Backtrace.h
index b89bc89..00f0a10 100644
--- a/libbacktrace/Backtrace.h
+++ b/libbacktrace/Backtrace.h
@@ -21,6 +21,10 @@
#include <sys/types.h>
+// Macro to log the function name along with the warning message.
+#define BACK_LOGW(format, ...) \
+ ALOGW("%s: " format, __PRETTY_FUNCTION__, ##__VA_ARGS__)
+
class BacktraceImpl {
public:
virtual ~BacktraceImpl() { }