summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/backtrace.h
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2016-02-05 16:17:39 -0800
committerColin Cross <ccross@android.com>2016-02-18 16:09:17 -0800
commit2c75991359df165ca7cc7a6213fb227c0b5ed87c (patch)
tree4dc02df00481962e80acb454ee857fd5b2f8b2d4 /libc/malloc_debug/backtrace.h
parent2d4721c0c57fe2f7c1e1b40df4763a561b3cf856 (diff)
Add backtrace_string and export to libmemunreachable
Add backtrace_string to convert a malloc_debug backtrace to a string. Also move the backtrace functions to libc_malloc_debug_backtrace so that libmemunreachable can reuse them. Change-Id: I5ad67001c0b4d184903c762863a8588181d4873b
Diffstat (limited to 'libc/malloc_debug/backtrace.h')
-rw-r--r--libc/malloc_debug/backtrace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/malloc_debug/backtrace.h b/libc/malloc_debug/backtrace.h
index 9e010095f..f5708737d 100644
--- a/libc/malloc_debug/backtrace.h
+++ b/libc/malloc_debug/backtrace.h
@@ -32,9 +32,12 @@
#include <stdint.h>
#include <sys/cdefs.h>
+#include <string>
+
void backtrace_startup();
void backtrace_shutdown();
size_t backtrace_get(uintptr_t* frames, size_t frame_count);
void backtrace_log(const uintptr_t* frames, size_t frame_count);
+std::string backtrace_string(const uintptr_t* frames, size_t frame_count);
#endif // MALLOC_DEBUG_BACKTRACE_H