kernel: Show stacktraces on all signal terminations
This commit is contained in:
parent
e34395915d
commit
2a85a7473a
@ -95,8 +95,6 @@ void handle_cpu_exception(int signo, const char* err, Registers* regs)
|
||||
kerrorln("R12: %.16lx R13: %.16lx R14: %.16lx R15: %.16lx", regs->r12, regs->r13, regs->r14, regs->r15);
|
||||
kerrorln("RIP: %.16lx CS: %.16lx SS: %.16lx FLAGS: %.16lx", regs->rip, regs->cs, regs->ss, regs->rflags);
|
||||
|
||||
CPU::print_stack_trace_at(regs);
|
||||
|
||||
if (!is_in_kernel(regs))
|
||||
{
|
||||
auto* current = Scheduler::current();
|
||||
|
@ -187,7 +187,10 @@ void Thread::process_pending_signals(Registers* current_regs)
|
||||
switch (action)
|
||||
{
|
||||
case DefaultSignalAction::Ignore: return;
|
||||
case DefaultSignalAction::Terminate: exit_and_signal_parent(signo | _SIGBIT);
|
||||
case DefaultSignalAction::Terminate:
|
||||
kwarnln("Terminating thread %d with signal %d", id, signo);
|
||||
CPU::print_stack_trace_at(current_regs);
|
||||
exit_and_signal_parent(signo | _SIGBIT);
|
||||
case DefaultSignalAction::Stop: stop();
|
||||
default: return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user