This commit is contained in:
Alex 2022-12-11 05:30:46 +02:00
parent bade38e173
commit 16bcb896fa
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
3 changed files with 7 additions and 5 deletions

View File

@ -25,14 +25,13 @@ namespace CrashHandler
SafeFunction void TraceFrames(CHArchTrapFrame *Frame, int Count, SymbolResolver::Symbols *SymHandle, bool Kernel)
{
#if defined(__amd64__)
struct StackFrame *frames = (struct StackFrame *)Frame->rbp; // (struct StackFrame *)__builtin_frame_address(0);
#elif defined(__i386__)
struct StackFrame *frames = (struct StackFrame *)Frame->ebp; // (struct StackFrame *)__builtin_frame_address(0);
#elif defined(__aarch64__)
#endif
debug("Stack tracing...");
debug("\nStack tracing... %p %d %p %d", Frame, Count, frames, Kernel);
EHPrint("\e7981FC\nStack Trace:\n");
if (!frames || !frames->rip || !frames->rbp)
{

View File

@ -28,7 +28,7 @@ namespace CrashHandler
SymbolResolver::Symbols *sh = data.Process->ELFSymbolTable;
if (!sh)
{
EHPrint("\eFF0000< No symbol table available. >\n");
EHPrint("\n\eFF0000< No symbol table available. >\n");
return;
}
TraceFrames(data.Frame, 40, sh, false);

View File

@ -15,8 +15,11 @@ static uint64_t sys_exit(SyscallsFrame *Frame, uint64_t code)
static int sys_print(SyscallsFrame *Frame, char Char, int Index)
{
debug("%c", Char);
return Display->Print(Char, Index, true);
int ret = Display->Print(Char, Index, true);
#ifdef DEBUG
Display->SetBuffer(Index);
#endif
return ret;
}
static void *NativeSyscallsTable[] = {