Update for new TRAP_PERF value.

For the new kernel 5.13 heders, there is a new TRAP_PERF value that
needs to be handled.

Test: Builds.
Change-Id: I2c6658ca94423c210db9ad6692ec69f6be69b3f5
This commit is contained in:
Christopher Ferris 2021-07-01 01:43:21 +00:00
parent 8d7c887b23
commit c31ccb44bf

View file

@ -402,6 +402,8 @@ const char* get_sigcode(const siginfo_t* si) {
case TRAP_HWBKPT: return "TRAP_HWBKPT";
case TRAP_UNK:
return "TRAP_UNDIAGNOSED";
case TRAP_PERF:
return "TRAP_PERF";
}
if ((si->si_code & 0xff) == SIGTRAP) {
switch ((si->si_code >> 8) & 0xff) {
@ -423,7 +425,7 @@ const char* get_sigcode(const siginfo_t* si) {
return "PTRACE_EVENT_STOP";
}
}
static_assert(NSIGTRAP == TRAP_UNK, "missing TRAP_* si_code");
static_assert(NSIGTRAP == TRAP_PERF, "missing TRAP_* si_code");
break;
}
// Then the other codes...