[arm] allow duplicate addresses on backtrace
All checks were successful
eden-license / license-header (pull_request) Successful in 19s
All checks were successful
eden-license / license-header (pull_request) Successful in 19s
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
89d40c6302
commit
3d3ab28a3d
1 changed files with 5 additions and 17 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -12,25 +14,11 @@ namespace Core {
|
||||||
void ArmInterface::LogBacktrace(Kernel::KProcess* process) const {
|
void ArmInterface::LogBacktrace(Kernel::KProcess* process) const {
|
||||||
Kernel::Svc::ThreadContext ctx;
|
Kernel::Svc::ThreadContext ctx;
|
||||||
this->GetContext(ctx);
|
this->GetContext(ctx);
|
||||||
|
|
||||||
LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", ctx.sp, ctx.pc);
|
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, "");
|
auto const backtrace = GetBacktraceFromContext(process, ctx);
|
||||||
|
for (auto const& entry : backtrace)
|
||||||
const auto backtrace = GetBacktraceFromContext(process, ctx);
|
LOG_ERROR(Core_ARM, "{:20}{:016X} {:016X} {:016X} {}", entry.module, entry.address, entry.original_address, entry.offset, entry.name);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Kernel::DebugWatchpoint* ArmInterface::MatchingWatchpoint(
|
const Kernel::DebugWatchpoint* ArmInterface::MatchingWatchpoint(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue