mirror of
https://github.com/PabloMK7/citra.git
synced 2024-12-29 11:06:12 +00:00
Add a couple of useful SVC logs
This commit is contained in:
parent
3871d74bc2
commit
e6b40486c5
|
@ -1607,6 +1607,7 @@ void SVC::CallSVC(u32 immediate) {
|
|||
"Running threads from exiting processes is unimplemented");
|
||||
|
||||
const FunctionDef* info = GetSVCInfo(immediate);
|
||||
LOG_TRACE(Kernel_SVC, "calling {}", info->name);
|
||||
if (info) {
|
||||
if (info->func) {
|
||||
(this->*(info->func))();
|
||||
|
|
|
@ -280,6 +280,26 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
template <typename SVCT>
|
||||
struct WrapPass<SVCT, ResultCode /*empty for T, Ts...*/> {
|
||||
// Call function R(Context::svc)(Us...) and transfer the return value to registers
|
||||
template <typename... Us>
|
||||
static void Call(Context& context, SVCT svc, Us... u) {
|
||||
static_assert(std::is_same_v<SVCT, ResultCode (Context::*)(Us...)>);
|
||||
if constexpr (std::is_void_v<ResultCode>) {
|
||||
(context.*svc)(u...);
|
||||
} else {
|
||||
ResultCode r = (context.*svc)(u...);
|
||||
if (r.IsError()) {
|
||||
LOG_ERROR(Kernel_SVC, "level={} summary={} module={} description={}",
|
||||
r.level.ExtractValue(r.raw), r.summary.ExtractValue(r.raw),
|
||||
r.module.ExtractValue(r.raw), r.description.ExtractValue(r.raw));
|
||||
}
|
||||
SetParam<INDEX_RETURN, ResultCode, ResultCode, Us...>(context, r);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct WrapHelper;
|
||||
|
||||
|
|
Loading…
Reference in a new issue