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

Kernel: Add magic key combo (Alt+Shift+F12) to dump scheduler state

Pressing this combo will dump a list of all threads and their state
to the debug console.

This might be useful to figure out why the system is not responding.
This commit is contained in:
Andreas Kling 2021-04-18 19:57:17 +02:00
parent 685556ae84
commit 24dcd99e4b
3 changed files with 55 additions and 23 deletions

View file

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