mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-06 04:49:19 +00:00
Changed a lot of files. Summary: profiler support; "SafeFunction"; UnlockDeadLock kernel config; Code optimization & more
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include "../../crashhandler.hpp"
|
||||
#include "../chfcts.hpp"
|
||||
|
||||
#include <interrupts.hpp>
|
||||
#include <display.hpp>
|
||||
#include <printf.h>
|
||||
#include <debug.h>
|
||||
@ -17,9 +18,29 @@
|
||||
|
||||
namespace CrashHandler
|
||||
{
|
||||
__no_stack_protector void DisplayStackFrameScreen(CRData data)
|
||||
SafeFunction void DisplayStackFrameScreen(CRData data)
|
||||
{
|
||||
EHPrint("\eFAFAFATracing 40 frames...\n");
|
||||
TraceFrames(data.Frame, 40);
|
||||
EHPrint("\n\n\eFAFAFATracing interrupt frames...\n");
|
||||
for (uint64_t i = 0; i < 8; i++)
|
||||
{
|
||||
if (EHIntFrames[i])
|
||||
{
|
||||
if (!Memory::Virtual().Check(EHIntFrames[i]))
|
||||
continue;
|
||||
EHPrint("\n\e2565CC%p", EHIntFrames[i]);
|
||||
EHPrint("\e7925CC-");
|
||||
#if defined(__amd64__)
|
||||
if ((uint64_t)EHIntFrames[i] >= 0xFFFFFFFF80000000 && (uint64_t)EHIntFrames[i] <= (uint64_t)&_kernel_end)
|
||||
#elif defined(__i386__)
|
||||
if ((uint64_t)EHIntFrames[i] >= 0xC0000000 && (uint64_t)EHIntFrames[i] <= (uint64_t)&_kernel_end)
|
||||
#elif defined(__aarch64__)
|
||||
#endif
|
||||
EHPrint("\e25CCC9%s", KernelSymbolTable->GetSymbolFromAddress((uint64_t)EHIntFrames[i]));
|
||||
else
|
||||
EHPrint("\eFF4CA9Outside Kernel");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user