revise error printed for kernel-/debugger-sent SIGSEGVs

This commit is contained in:
Matthew Flatt 2014-04-27 07:50:41 -06:00
parent 9e9b291d4a
commit 5232b099a2

View File

@ -82,7 +82,7 @@ void fault_handler(int sn, siginfo_t *si, void *ctx)
/* supposedly its coming from the user via kill */
/* so just ignore it. It appears when */
/* running w/ places in GDB */
printf("SIGSEGV SI_USER SI_CODE %i fault on addr %p\n", c, p);
printf("SIGSEGV SI_USER SI_ERRNO %i fault on addr %p\n", si->si_errno, p);
#ifdef MZ_USE_PLACES
printf("pid %i uid %i thread %lx\n", si->si_pid, si->si_uid, mz_proc_thread_self());
#else
@ -91,7 +91,7 @@ void fault_handler(int sn, siginfo_t *si, void *ctx)
return;
}
if (c == 128) {
printf("SIGSEGV SI_KERNEL SI_CODE %i fault on addr %p sent by kernel\n", c, p);
printf("SIGSEGV SI_KERNEL SI_ERRNO %i fault on addr %p\n", si->si_errno, p);
}
#if WAIT_FOR_GDB
launchgdb();