service: Add service function name lookup based on header code
This is for displaying the function name for HLE requests. Probably it is possible to do the same for LLE ones but it would require having the HLE handlers available even when not using them, which doesn't seem to make sense and is more of a hack than a proper solution in my opinion.
This commit is contained in:
parent
1cf75e55c2
commit
71e0c40310
|
@ -179,6 +179,14 @@ void ServiceFrameworkBase::HandleSyncRequest(Kernel::HLERequestContext& context)
|
|||
handler_invoker(this, info->handler_callback, context);
|
||||
}
|
||||
|
||||
std::string ServiceFrameworkBase::GetFunctionName(u32 header) const {
|
||||
if (!handlers.count(header)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return handlers.at(header).name;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Module interface
|
||||
|
||||
|
|
|
@ -64,6 +64,9 @@ public:
|
|||
|
||||
void HandleSyncRequest(Kernel::HLERequestContext& context) override;
|
||||
|
||||
/// Retrieves name of a function based on the header code. For IPC Recorder.
|
||||
std::string GetFunctionName(u32 header) const;
|
||||
|
||||
protected:
|
||||
/// Member-function pointer type of SyncRequest handlers.
|
||||
template <typename Self>
|
||||
|
|
Reference in New Issue