Print ABI in backtraces.
This lets the stack tool figure out which toolchain to use
automatically.
Change-Id: Ia235d6904622423fe6fbc7b0315a1861e52a41ad
diff --git a/debuggerd/utility.h b/debuggerd/utility.h
index ee4f035..f2e2d29 100644
--- a/debuggerd/utility.h
+++ b/debuggerd/utility.h
@@ -21,6 +21,22 @@
#include <stdbool.h>
#include <sys/types.h>
+// Figure out the abi based on defined macros.
+#if defined(__arm__)
+#define ABI_STRING "arm"
+#elif defined(__aarch64__)
+#define ABI_STRING "arm64"
+#elif defined(__mips__)
+#define ABI_STRING "mips"
+#elif defined(__i386__)
+#define ABI_STRING "x86"
+#elif defined(__x86_64__)
+#define ABI_STRING "x86_64"
+#else
+#error "Unsupported ABI"
+#endif
+
+
typedef struct {
/* tombstone file descriptor */
int tfd;