mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 21:31:04 +00:00
SvcBreak: Print out stack trace
This commit is contained in:
parent
644e457a62
commit
b16c121388
@ -411,6 +411,12 @@ static void Break(u8 break_reason) {
|
|||||||
default: reason_str = "UNKNOWN"; break;
|
default: reason_str = "UNKNOWN"; break;
|
||||||
}
|
}
|
||||||
LOG_CRITICAL(Debug_Emulated, "Break reason: %s", reason_str.c_str());
|
LOG_CRITICAL(Debug_Emulated, "Break reason: %s", reason_str.c_str());
|
||||||
|
|
||||||
|
std::vector<u32> stack_trace = Core::g_app_core->GetStackTrace();
|
||||||
|
for (int i = 0; i < stack_trace.size(); i++) {
|
||||||
|
// Mimic GDB, print stack traces with highest-level procedures displayed first
|
||||||
|
LOG_CRITICAL(Debug_Emulated, " #%d: 0x%08X", i, stack_trace[stack_trace.size() - 1 - i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
||||||
|
Loading…
Reference in New Issue
Block a user