Next phase of the move, reformat use C++ features.

Use the libbacktrace C++ interface instead of the C interface in debuggerd.

Reformat the debuggerd code to be closer to Google C++ style.

Fix all debuggerd casts to be C++ casts.

Add a frame number to the frame data structure for ease of formatting and
add another FormatFrameData function.

Change the format_test to use the new FormatFrameData function.

Modify all of the backtrace_test to use the C++ interface.

Change-Id: I10e1610861acf7f4a3ad53276b74971cfbfda464
diff --git a/debuggerd/backtrace.h b/debuggerd/backtrace.h
index 54a60b2..2ec8afb 100644
--- a/debuggerd/backtrace.h
+++ b/debuggerd/backtrace.h
@@ -17,21 +17,19 @@
 #ifndef _DEBUGGERD_BACKTRACE_H
 #define _DEBUGGERD_BACKTRACE_H
 
-#include <stddef.h>
-#include <stdbool.h>
 #include <sys/types.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. */
+class Backtrace;
+
+// 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);
+                    int* total_sleep_time_usec);
 
 /* Dumps the backtrace in the backtrace data structure to the log. */
-void dump_backtrace_to_log(const backtrace_context_t* context, log_t* log,
-        int scope_flags, const char* prefix);
+void dump_backtrace_to_log(Backtrace* backtrace, log_t* log,
+                           int scope_flags, const char* prefix);
 
 #endif // _DEBUGGERD_BACKTRACE_H