mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 23:39:20 +00:00
Updated crash screen
This commit is contained in:
@ -35,14 +35,10 @@ namespace CrashHandler
|
||||
if (cpu)
|
||||
{
|
||||
EHPrint("\eE46CEBCPU Data Address: %#lx\n", cpu);
|
||||
EHPrint("Syscalls Stack: %#lx\n", cpu->SystemCallStack);
|
||||
EHPrint("TempStack: %#lx\n", cpu->TempStack);
|
||||
EHPrint("Core Stack: %#lx\n", cpu->Stack);
|
||||
EHPrint("Core ID: %ld\n", cpu->ID);
|
||||
EHPrint("Error Code: %ld\n", cpu->ErrorCode);
|
||||
EHPrint("Syscalls Stack: %#lx, TempStack: %#lx\n", cpu->SystemCallStack, cpu->TempStack);
|
||||
EHPrint("Core Stack: %#lx, Core ID: %ld, Error Code: %ld\n", cpu->Stack, cpu->ID, cpu->ErrorCode);
|
||||
EHPrint("Is Active: %s\n", cpu->IsActive ? "true" : "false");
|
||||
EHPrint("Current Process: %#lx\n", cpu->CurrentProcess);
|
||||
EHPrint("Current Thread: %#lx\n", cpu->CurrentThread);
|
||||
EHPrint("Current Process: %#lx, Current Thread: %#lx\n", cpu->CurrentProcess, cpu->CurrentThread);
|
||||
EHPrint("Arch Specific Data: %#lx\n", cpu->Data);
|
||||
EHPrint("Checksum: 0x%X\n", cpu->Checksum);
|
||||
}
|
||||
|
@ -270,9 +270,9 @@ namespace CrashHandler
|
||||
|
||||
CPU::x64::PageFaultErrorCode params = {.raw = (uint32_t)Frame->ErrorCode};
|
||||
#if defined(__amd64__)
|
||||
EHPrint("At \e8888FF%#lx \eFAFAFAby \e8888FF%#lx\eFAFAFA\n", CPU::x64::readcr2().PFLA, Frame->rip);
|
||||
EHPrint("At \e8888FF%#lx \eFAFAFAby \e8888FF%#lx\eFAFAFA\n", PageFaultAddress, Frame->rip);
|
||||
#elif defined(__i386__)
|
||||
EHPrint("At \e8888FF%#lx \eFAFAFAby \e8888FF%#lx\eFAFAFA\n", CPU::x64::readcr2().PFLA, Frame->eip);
|
||||
EHPrint("At \e8888FF%#lx \eFAFAFAby \e8888FF%#lx\eFAFAFA\n", PageFaultAddress, Frame->eip);
|
||||
#elif defined(__aarch64__)
|
||||
#endif
|
||||
EHPrint("Page: %s\eFAFAFA\n", params.P ? "\e058C19Present" : "\eE85230Not Present");
|
||||
|
@ -53,31 +53,29 @@ namespace CrashHandler
|
||||
}
|
||||
if (data.Process && data.Thread)
|
||||
{
|
||||
EHPrint("\n\n\eFAFAFATracing thread RIP history...");
|
||||
EHPrint("\n\n\eFAFAFATracing thread instruction pointer history...");
|
||||
SymbolResolver::Symbols *sh = data.Process->ELFSymbolTable;
|
||||
if (!sh)
|
||||
EHPrint("\n\eFFA500Warning: No symbol table available.");
|
||||
int SameItr = 0;
|
||||
uintptr_t LastRIP = 0;
|
||||
for (int i = 0; i < 128; i++)
|
||||
for (size_t i = 0; i < sizeof(data.Thread->IPHistory) / sizeof(data.Thread->IPHistory[0]); i++)
|
||||
{
|
||||
if (data.Thread->IPHistory[i] == 0)
|
||||
break;
|
||||
if (data.Thread->IPHistory[i] == LastRIP)
|
||||
{
|
||||
SameItr++;
|
||||
if (SameItr > 3)
|
||||
if (SameItr > 2)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
SameItr = 0;
|
||||
LastRIP = data.Thread->IPHistory[i];
|
||||
if (!sh)
|
||||
EHPrint("\n\e2565CC%p", data.Thread->IPHistory[i]);
|
||||
EHPrint("\n\eCCCCCC%d: \e2565CC%p", i, data.Thread->IPHistory[i]);
|
||||
else
|
||||
EHPrint("\n\e2565CC%p\e7925CC-\e25CCC9%s", data.Thread->IPHistory[i], sh->GetSymbolFromAddress(data.Thread->IPHistory[i]));
|
||||
EHPrint("\n\eCCCCCC%d: \e2565CC%p\e7925CC-\e25CCC9%s", i, data.Thread->IPHistory[i], sh->GetSymbolFromAddress(data.Thread->IPHistory[i]));
|
||||
}
|
||||
EHPrint("\n\e7925CCNote: \e2565CCSame RIPs are not shown more than 3 times.\n");
|
||||
EHPrint("\n\e7925CCNote: \e2565CCSame instruction pointers are not shown more than 3 times.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user