summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris2018-06-27 17:06:01 -0500
committerChristopher Ferris2018-06-29 18:43:21 -0500
commit432791e0dcec4d4adf07580ffc4d4fb822f56076 (patch)
tree74c25098b5f8f2e091e122da13a563a748e36c25 /debuggerd
parent78ea17a6415c5d231606c7099eed7febc7801052 (diff)
downloadplatform-system-core-432791e0dcec4d4adf07580ffc4d4fb822f56076.tar.gz
platform-system-core-432791e0dcec4d4adf07580ffc4d4fb822f56076.tar.xz
platform-system-core-432791e0dcec4d4adf07580ffc4d4fb822f56076.zip
Add support for new defines in v4.17.3 headers.
Test: Builds and unit tests pass. Change-Id: Ibd5711effb1e599d3239d45124383fe91e0f573d
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/libdebuggerd/utility.cpp46
1 files changed, 29 insertions, 17 deletions
diff --git a/debuggerd/libdebuggerd/utility.cpp b/debuggerd/libdebuggerd/utility.cpp
index 1f6f3c803..8bdc02f90 100644
--- a/debuggerd/libdebuggerd/utility.cpp
+++ b/debuggerd/libdebuggerd/utility.cpp
@@ -287,9 +287,7 @@ const char* get_signame(const siginfo_t* si) {
287 case SIGFPE: return "SIGFPE"; 287 case SIGFPE: return "SIGFPE";
288 case SIGILL: return "SIGILL"; 288 case SIGILL: return "SIGILL";
289 case SIGSEGV: return "SIGSEGV"; 289 case SIGSEGV: return "SIGSEGV";
290#if defined(SIGSTKFLT)
291 case SIGSTKFLT: return "SIGSTKFLT"; 290 case SIGSTKFLT: return "SIGSTKFLT";
292#endif
293 case SIGSTOP: return "SIGSTOP"; 291 case SIGSTOP: return "SIGSTOP";
294 case SIGSYS: return "SIGSYS"; 292 case SIGSYS: return "SIGSYS";
295 case SIGTRAP: return "SIGTRAP"; 293 case SIGTRAP: return "SIGTRAP";
@@ -311,8 +309,14 @@ const char* get_sigcode(const siginfo_t* si) {
311 case ILL_PRVREG: return "ILL_PRVREG"; 309 case ILL_PRVREG: return "ILL_PRVREG";
312 case ILL_COPROC: return "ILL_COPROC"; 310 case ILL_COPROC: return "ILL_COPROC";
313 case ILL_BADSTK: return "ILL_BADSTK"; 311 case ILL_BADSTK: return "ILL_BADSTK";
312 case ILL_BADIADDR:
313 return "ILL_BADIADDR";
314 case __ILL_BREAK:
315 return "ILL_BREAK";
316 case __ILL_BNDMOD:
317 return "ILL_BNDMOD";
314 } 318 }
315 static_assert(NSIGILL == ILL_BADSTK, "missing ILL_* si_code"); 319 static_assert(NSIGILL == __ILL_BNDMOD, "missing ILL_* si_code");
316 break; 320 break;
317 case SIGBUS: 321 case SIGBUS:
318 switch (si->si_code) { 322 switch (si->si_code) {
@@ -334,36 +338,44 @@ const char* get_sigcode(const siginfo_t* si) {
334 case FPE_FLTRES: return "FPE_FLTRES"; 338 case FPE_FLTRES: return "FPE_FLTRES";
335 case FPE_FLTINV: return "FPE_FLTINV"; 339 case FPE_FLTINV: return "FPE_FLTINV";
336 case FPE_FLTSUB: return "FPE_FLTSUB"; 340 case FPE_FLTSUB: return "FPE_FLTSUB";
341 case __FPE_DECOVF:
342 return "FPE_DECOVF";
343 case __FPE_DECDIV:
344 return "FPE_DECDIV";
345 case __FPE_DECERR:
346 return "FPE_DECERR";
347 case __FPE_INVASC:
348 return "FPE_INVASC";
349 case __FPE_INVDEC:
350 return "FPE_INVDEC";
351 case FPE_FLTUNK:
352 return "FPE_FLTUNK";
353 case FPE_CONDTRAP:
354 return "FPE_CONDTRAP";
337 } 355 }
338 static_assert(NSIGFPE == FPE_FLTSUB, "missing FPE_* si_code"); 356 static_assert(NSIGFPE == FPE_CONDTRAP, "missing FPE_* si_code");
339 break; 357 break;
340 case SIGSEGV: 358 case SIGSEGV:
341 switch (si->si_code) { 359 switch (si->si_code) {
342 case SEGV_MAPERR: return "SEGV_MAPERR"; 360 case SEGV_MAPERR: return "SEGV_MAPERR";
343 case SEGV_ACCERR: return "SEGV_ACCERR"; 361 case SEGV_ACCERR: return "SEGV_ACCERR";
344#if defined(SEGV_BNDERR)
345 case SEGV_BNDERR: return "SEGV_BNDERR"; 362 case SEGV_BNDERR: return "SEGV_BNDERR";
346#endif
347#if defined(SEGV_PKUERR)
348 case SEGV_PKUERR: return "SEGV_PKUERR"; 363 case SEGV_PKUERR: return "SEGV_PKUERR";
349#endif 364 case SEGV_ACCADI:
365 return "SEGV_ACCADI";
366 case SEGV_ADIDERR:
367 return "SEGV_ADIDERR";
368 case SEGV_ADIPERR:
369 return "SEGV_ADIPERR";
350 } 370 }
351#if defined(SEGV_PKUERR) 371 static_assert(NSIGSEGV == SEGV_ADIPERR, "missing SEGV_* si_code");
352 static_assert(NSIGSEGV == SEGV_PKUERR, "missing SEGV_* si_code");
353#elif defined(SEGV_BNDERR)
354 static_assert(NSIGSEGV == SEGV_BNDERR, "missing SEGV_* si_code");
355#else
356 static_assert(NSIGSEGV == SEGV_ACCERR, "missing SEGV_* si_code");
357#endif
358 break; 372 break;
359#if defined(SYS_SECCOMP) // Our glibc is too old, and we build this for the host too.
360 case SIGSYS: 373 case SIGSYS:
361 switch (si->si_code) { 374 switch (si->si_code) {
362 case SYS_SECCOMP: return "SYS_SECCOMP"; 375 case SYS_SECCOMP: return "SYS_SECCOMP";
363 } 376 }
364 static_assert(NSIGSYS == SYS_SECCOMP, "missing SYS_* si_code"); 377 static_assert(NSIGSYS == SYS_SECCOMP, "missing SYS_* si_code");
365 break; 378 break;
366#endif
367 case SIGTRAP: 379 case SIGTRAP:
368 switch (si->si_code) { 380 switch (si->si_code) {
369 case TRAP_BRKPT: return "TRAP_BRKPT"; 381 case TRAP_BRKPT: return "TRAP_BRKPT";