mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Add "screen" command to panic UI
This commit is contained in:
@ -40,10 +40,12 @@
|
||||
#include "keyboard.hpp"
|
||||
|
||||
extern void ExPrint(const char *Format, ...);
|
||||
extern Video::Font *CrashFont;
|
||||
extern void DiagnosticDataCollection();
|
||||
extern void InitFont();
|
||||
|
||||
extern Video::Font *CrashFont;
|
||||
extern void *FbBeforePanic;
|
||||
|
||||
struct StackFrame
|
||||
{
|
||||
struct StackFrame *bp;
|
||||
@ -789,6 +791,7 @@ nsa void UserInput(char *Input)
|
||||
ExPrint("\eCACACA mem - Display memory information.\n");
|
||||
ExPrint("\eAAAAAA dump [addr] [len] - Dump [len] bytes from [addr].\n");
|
||||
ExPrint("\eCACACA diag - Collect diagnostic information.\n");
|
||||
ExPrint("\eAAAAAA screen - Display the final output prior to system panic.\n");
|
||||
}
|
||||
else if (strcmp(Input, "clear") == 0)
|
||||
{
|
||||
@ -918,6 +921,17 @@ nsa void UserInput(char *Input)
|
||||
{
|
||||
DiagnosticDataCollection();
|
||||
}
|
||||
else if (strcmp(Input, "screen") == 0)
|
||||
{
|
||||
if (unlikely(FbBeforePanic == nullptr))
|
||||
{
|
||||
ExPrint("\eFF0000No screen data available\n");
|
||||
goto End;
|
||||
}
|
||||
memcpy(Display->GetBuffer, FbBeforePanic, Display->GetSize);
|
||||
Display->UpdateBuffer();
|
||||
return;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else if (strcmp(Input, "pt") == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user