mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-30 00:08:03 +00:00
Fixed RIP tracing
This commit is contained in:
parent
061edc0f13
commit
47e4731b78
@ -56,28 +56,28 @@ namespace CrashHandler
|
|||||||
EHPrint("\n\n\eFAFAFATracing thread RIP history...");
|
EHPrint("\n\n\eFAFAFATracing thread RIP history...");
|
||||||
SymbolResolver::Symbols *sh = data.Process->ELFSymbolTable;
|
SymbolResolver::Symbols *sh = data.Process->ELFSymbolTable;
|
||||||
if (!sh)
|
if (!sh)
|
||||||
EHPrint("\n\eFF0000< No symbol table available. >\n");
|
EHPrint("\n\eFFA500Warning: No symbol table available.");
|
||||||
else
|
int SameItr = 0;
|
||||||
|
uint64_t LastRIP = 0;
|
||||||
|
for (int i = 0; i < 128; i++)
|
||||||
{
|
{
|
||||||
int SameItr = 0;
|
if (data.Thread->RIPHistory[i] == 0)
|
||||||
uint64_t LastRIP = 0;
|
break;
|
||||||
for (int i = 0; i < 128; i++)
|
if (data.Thread->RIPHistory[i] == LastRIP)
|
||||||
{
|
{
|
||||||
if (data.Thread->RIPHistory[i] == 0)
|
SameItr++;
|
||||||
break;
|
if (SameItr > 3)
|
||||||
if (data.Thread->RIPHistory[i] == LastRIP)
|
continue;
|
||||||
{
|
|
||||||
SameItr++;
|
|
||||||
if (SameItr > 3)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
SameItr = 0;
|
|
||||||
LastRIP = data.Thread->RIPHistory[i];
|
|
||||||
EHPrint("\n\e2565CC%p\e7925CC-\e25CCC9%s", data.Thread->RIPHistory[i], sh->GetSymbolFromAddress((uint64_t)data.Thread->RIPHistory[i]));
|
|
||||||
}
|
}
|
||||||
EHPrint("\n\e7925CCNote: \e2565CCSame RIPs are not shown more than 3 times.\n");
|
else
|
||||||
|
SameItr = 0;
|
||||||
|
LastRIP = data.Thread->RIPHistory[i];
|
||||||
|
if (!sh)
|
||||||
|
EHPrint("\n\e2565CC%p", data.Thread->RIPHistory[i]);
|
||||||
|
else
|
||||||
|
EHPrint("\n\e2565CC%p\e7925CC-\e25CCC9%s", data.Thread->RIPHistory[i], sh->GetSymbolFromAddress((uint64_t)data.Thread->RIPHistory[i]));
|
||||||
}
|
}
|
||||||
|
EHPrint("\n\e7925CCNote: \e2565CCSame RIPs are not shown more than 3 times.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user