1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

Kernel: Optionally dump scheduler state with stack traces

This will dump stack traces of all threads when pressing
Ctrl+Shift+Alt+F12
This commit is contained in:
Tom 2021-07-15 14:54:19 -06:00 committed by Andreas Kling
parent 0150ae4bbd
commit 82e9fe8d67
4 changed files with 11 additions and 8 deletions

View file

@ -32,10 +32,10 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
return;
}
if (m_modifiers == (Mod_Alt | Mod_Shift) && byte == 0x58) {
if ((m_modifiers == (Mod_Alt | Mod_Shift) || m_modifiers == (Mod_Ctrl | Mod_Alt | Mod_Shift)) && byte == 0x58) {
// Alt+Shift+F12 pressed, dump some kernel state to the debug console.
ConsoleManagement::the().switch_to_debug();
Scheduler::dump_scheduler_state();
Scheduler::dump_scheduler_state(m_modifiers == (Mod_Ctrl | Mod_Alt | Mod_Shift));
}
dbgln_if(KEYBOARD_DEBUG, "Keyboard::irq_handle_byte_read: {:#02x} {}", ch, (pressed ? "down" : "up"));