omjavaid created this revision. omjavaid added reviewers: labath, jankratochvil. Herald added subscribers: danielkiss, kristof.beyls, tschuett. Herald added a reviewer: rengolin.
This patch increases maximum register size to 256 bytes to accommodate AArch64 SVE registers maximum possible size of 256 bytes. https://reviews.llvm.org/D77044 Files: lldb/include/lldb/Utility/RegisterValue.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/source/Utility/RegisterValue.cpp Index: lldb/source/Utility/RegisterValue.cpp =================================================================== --- lldb/source/Utility/RegisterValue.cpp +++ lldb/source/Utility/RegisterValue.cpp @@ -810,7 +810,7 @@ if (buffer.length != rhs.buffer.length) return false; else { - uint8_t length = buffer.length; + uint32_t length = buffer.length; if (length > kMaxRegisterByteSize) length = kMaxRegisterByteSize; return memcmp(buffer.bytes, rhs.buffer.bytes, length) == 0; Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -2048,7 +2048,8 @@ packet, "P packet missing '=' char after register number"); // Parse out the value. - uint8_t reg_bytes[32]; // big enough to support up to 256 bit ymmN register + uint8_t reg_bytes[256]; // big enough to support up to 256 byte AArch64 SVE + // registers size_t reg_size = packet.GetHexBytesAvail(reg_bytes); // Get the thread to use. Index: lldb/include/lldb/Utility/RegisterValue.h =================================================================== --- lldb/include/lldb/Utility/RegisterValue.h +++ lldb/include/lldb/Utility/RegisterValue.h @@ -26,7 +26,7 @@ class RegisterValue { public: - enum { kMaxRegisterByteSize = 64u }; + enum { kMaxRegisterByteSize = 256u }; enum Type { eTypeInvalid, @@ -261,7 +261,7 @@ struct { uint8_t bytes[kMaxRegisterByteSize]; // This must be big enough to hold any // register for any supported target. - uint8_t length; + uint32_t length; lldb::ByteOrder byte_order; } buffer; };
Index: lldb/source/Utility/RegisterValue.cpp =================================================================== --- lldb/source/Utility/RegisterValue.cpp +++ lldb/source/Utility/RegisterValue.cpp @@ -810,7 +810,7 @@ if (buffer.length != rhs.buffer.length) return false; else { - uint8_t length = buffer.length; + uint32_t length = buffer.length; if (length > kMaxRegisterByteSize) length = kMaxRegisterByteSize; return memcmp(buffer.bytes, rhs.buffer.bytes, length) == 0; Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp =================================================================== --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -2048,7 +2048,8 @@ packet, "P packet missing '=' char after register number"); // Parse out the value. - uint8_t reg_bytes[32]; // big enough to support up to 256 bit ymmN register + uint8_t reg_bytes[256]; // big enough to support up to 256 byte AArch64 SVE + // registers size_t reg_size = packet.GetHexBytesAvail(reg_bytes); // Get the thread to use. Index: lldb/include/lldb/Utility/RegisterValue.h =================================================================== --- lldb/include/lldb/Utility/RegisterValue.h +++ lldb/include/lldb/Utility/RegisterValue.h @@ -26,7 +26,7 @@ class RegisterValue { public: - enum { kMaxRegisterByteSize = 64u }; + enum { kMaxRegisterByteSize = 256u }; enum Type { eTypeInvalid, @@ -261,7 +261,7 @@ struct { uint8_t bytes[kMaxRegisterByteSize]; // This must be big enough to hold any // register for any supported target. - uint8_t length; + uint32_t length; lldb::ByteOrder byte_order; } buffer; };
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits