Update debuggerd to use libbacktrace.

Remove all of the code in debuggerd that uses libcorkscrew directly
and replace with libbacktrace.

Also do a bit of refactoring to clean up some functions that were
passing around variables that weren't used.

Bug: 8410085

Change-Id: I27da4fbe3f12ce38a85b4432fc1119984c9c391b
diff --git a/debuggerd/backtrace.h b/debuggerd/backtrace.h
index c5c786a..9d61e6f 100644
--- a/debuggerd/backtrace.h
+++ b/debuggerd/backtrace.h
@@ -21,11 +21,17 @@
 #include <stdbool.h>
 #include <sys/types.h>
 
-#include <corkscrew/ptrace.h>
+#include <backtrace/backtrace.h>
+
+#include "utility.h"
 
 /* Dumps a backtrace using a format similar to what Dalvik uses so that the result
  * can be intermixed in a bug report. */
 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed,
         int* total_sleep_time_usec);
 
+/* Dumps the backtrace in the backtrace data structure to the log. */
+void dump_backtrace_to_log(const backtrace_t* backtrace, log_t* log,
+        int scope_flags, const char* prefix);
+
 #endif // _DEBUGGERD_BACKTRACE_H