diff options
author | mailwl <mailwl@gmail.com> | 2018-02-15 15:22:11 +0100 |
---|---|---|
committer | mailwl <mailwl@gmail.com> | 2018-02-16 04:15:05 +0100 |
commit | 6797d4a907f8c2022ef3dba10aac5d2d7667135a (patch) | |
tree | 61cd05e46117627a6dd66daae4a367340e7d8572 /src/core/hle/kernel | |
parent | Merge pull request #195 from bunnei/shared-font (diff) | |
download | yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar.gz yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar.bz2 yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar.lz yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar.xz yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.tar.zst yuzu-6797d4a907f8c2022ef3dba10aac5d2d7667135a.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 51 | ||||
-rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 6d16f71a7..25ba26f18 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -254,4 +254,55 @@ size_t HLERequestContext::GetWriteBufferSize() const { return is_buffer_b ? BufferDescriptorB()[0].Size() : BufferDescriptorC()[0].Size(); } +std::string HLERequestContext::Description() const { + if (!command_header) { + return "No command header available"; + } + std::ostringstream s; + s << "IPC::CommandHeader: Type:" << static_cast<u32>(command_header->type.Value()); + s << ", X(Pointer):" << command_header->num_buf_x_descriptors; + if (command_header->num_buf_x_descriptors) { + s << '['; + for (u64 i = 0; i < command_header->num_buf_x_descriptors; ++i) { + s << "0x" << std::hex << BufferDescriptorX()[i].Size(); + if (i < command_header->num_buf_x_descriptors - 1) + s << ", "; + } + s << ']'; + } + s << ", A(Send):" << command_header->num_buf_a_descriptors; + if (command_header->num_buf_a_descriptors) { + s << '['; + for (u64 i = 0; i < command_header->num_buf_a_descriptors; ++i) { + s << "0x" << std::hex << BufferDescriptorA()[i].Size(); + if (i < command_header->num_buf_a_descriptors - 1) + s << ", "; + } + s << ']'; + } + s << ", B(Receive):" << command_header->num_buf_b_descriptors; + if (command_header->num_buf_b_descriptors) { + s << '['; + for (u64 i = 0; i < command_header->num_buf_b_descriptors; ++i) { + s << "0x" << std::hex << BufferDescriptorB()[i].Size(); + if (i < command_header->num_buf_b_descriptors - 1) + s << ", "; + } + s << ']'; + } + s << ", C(ReceiveList):" << BufferDescriptorC().size(); + if (!BufferDescriptorC().empty()) { + s << '['; + for (u64 i = 0; i < BufferDescriptorC().size(); ++i) { + s << "0x" << std::hex << BufferDescriptorC()[i].Size(); + if (i < BufferDescriptorC().size() - 1) + s << ", "; + } + s << ']'; + } + s << ", data_size:" << command_header->data_size.Value(); + + return s.str(); +} + } // namespace Kernel diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 81e3489c8..b5631b773 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -202,6 +202,8 @@ public: return domain_objects.size(); } + std::string Description() const; + private: std::array<u32, IPC::COMMAND_BUFFER_LENGTH> cmd_buf; SharedPtr<Kernel::ServerSession> server_session; |