mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Kernel: Send more specific signals when crashing due to CPU exceptions.
- For division by zero, send SIGFPE. - For illegal instruction, send SIGILL. - For the rest, default to SIGSEGV.
This commit is contained in:
parent
0fa098845f
commit
6ffcee9176
3 changed files with 17 additions and 9 deletions
|
@ -720,14 +720,14 @@ void Process::sys$sigreturn()
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void Process::crash()
|
||||
void Process::crash(int signal)
|
||||
{
|
||||
ASSERT_INTERRUPTS_DISABLED();
|
||||
ASSERT(!is_dead());
|
||||
|
||||
dump_backtrace();
|
||||
|
||||
m_termination_signal = SIGSEGV;
|
||||
m_termination_signal = signal;
|
||||
dump_regions();
|
||||
ASSERT(is_ring3());
|
||||
die();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue