From 72af45032ea9a0ad56ff740b10b76ce9b44576c1 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Sat, 29 Aug 2020 02:05:52 +0200 Subject: [PATCH] libposix: turn notes like "sys: trap: general protection violation" to SIGSEGV --- sys/src/lib/posix/signals.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/src/lib/posix/signals.c b/sys/src/lib/posix/signals.c index fef4468..42a3333 100644 --- a/sys/src/lib/posix/signals.c +++ b/sys/src/lib/posix/signals.c @@ -450,6 +450,11 @@ translate_jehanne_kernel_note(const char *note, PosixSignalInfo *siginfo) siginfo->si_signo = PosixSIGSEGV; note += 26; siginfo->si_value._sival_raw = atoll(note); + } else if(strncmp("trap: general protection violation", note, 34) == 0){ + // trap: general protection violation pc=0x41cc54 + siginfo->si_signo = PosixSIGSEGV; + note += 38; + siginfo->si_value._sival_raw = atoll(note); } // TODO: implement