Update for kernel headers v4.7.2.
The new uapi kernel headers added a new SEGV reason code, so
add it to the tombstone code.
Update sync.c to include the needed data structures itself. Someone
else will be fixing this to work on old versus new kernels.
Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index 3ddd2b0..8506765 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -136,8 +136,13 @@
#if defined(SEGV_BNDERR)
case SEGV_BNDERR: return "SEGV_BNDERR";
#endif
+#if defined(SEGV_PKUERR)
+ case SEGV_PKUERR: return "SEGV_PKUERR";
+#endif
}
-#if defined(SEGV_BNDERR)
+#if defined(SEGV_PKUERR)
+ static_assert(NSIGSEGV == SEGV_PKUERR, "missing SEGV_* si_code");
+#elif defined(SEGV_BNDERR)
static_assert(NSIGSEGV == SEGV_BNDERR, "missing SEGV_* si_code");
#else
static_assert(NSIGSEGV == SEGV_ACCERR, "missing SEGV_* si_code");