mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-01-22 08:36:32 +01:00
arm: Skip duplicate consecutive addresses in backtrace output
Adds logic to track and skip duplicate consecutive addresses when logging backtraces. This improves log readability by removing redundant entries that point to the same address in sequence.
This commit is contained in:
parent
7dc72a0e95
commit
167a9e1a5b
1 changed files with 6 additions and 0 deletions
|
@ -18,9 +18,15 @@ void ArmInterface::LogBacktrace(Kernel::KProcess* process) const {
|
|||
"Offset", "Symbol");
|
||||
LOG_ERROR(Core_ARM, "");
|
||||
const auto backtrace = GetBacktraceFromContext(process, ctx);
|
||||
|
||||
u64 last_address = 0;
|
||||
for (const auto& entry : backtrace) {
|
||||
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 a new issue