mirror of https://git.suyu.dev/suyu/suyu
arm: Skip duplicate consecutive addresses in backtrace output
ref: aa56430f2a
This commit is contained in:
parent
d231c26e22
commit
266eb0d318
|
@ -14,13 +14,22 @@ void ArmInterface::LogBacktrace(Kernel::KProcess* process) const {
|
|||
this->GetContext(ctx);
|
||||
|
||||
LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", ctx.sp, ctx.pc);
|
||||
LOG_ERROR(Core_ARM, "{:20}{:20}{:20}{:20}{}", "Module Name", "Address", "Original Address",
|
||||
"Offset", "Symbol");
|
||||
LOG_ERROR(Core_ARM, "{:20}{:20}{:20}{:20}{}", "Module Name", "Address", "Original Address", "Offset", "Symbol");
|
||||
LOG_ERROR(Core_ARM, "");
|
||||
|
||||
const auto backtrace = GetBacktraceFromContext(process, ctx);
|
||||
u64 last_address = 0;
|
||||
|
||||
for (const auto& entry : backtrace) {
|
||||
|
||||
// Skip duplicate consecutive addresses
|
||||
if (entry.address == last_address)
|
||||
continue;
|
||||
|
||||
LOG_ERROR(Core_ARM, "{:20}{:016X} {:016X} {:016X} {}", entry.module, entry.address,
|
||||
entry.original_address, entry.offset, entry.name);
|
||||
|
||||
last_address = entry.address;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue