diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4312,10 +4312,12 @@ } else if (gdb_type == "data_ptr" || gdb_type == "code_ptr") { reg_info.format = eFormatAddressInfo; reg_info.encoding = eEncodingUint; - } else if (gdb_type == "i387_ext" || gdb_type == "float") { + } else if (gdb_type == "float") { reg_info.format = eFormatFloat; reg_info.encoding = eEncodingIEEE754; - } else if (gdb_type == "aarch64v") { + } else if (gdb_type == "aarch64v" || + llvm::StringRef(gdb_type).startswith("vec") || + gdb_type == "i387_ext") { reg_info.format = eFormatVectorOfUInt8; reg_info.encoding = eEncodingVector; } diff --git a/lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py b/lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py --- a/lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py +++ b/lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py @@ -151,6 +151,18 @@ self.match("register read flags", ["eflags = 0x94939291"]) + # both stX and xmmX should be displayed as vectors + self.match("register read st0", + ["st0 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a}"]) + self.match("register read st1", + ["st1 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}"]) + self.match("register read xmm0", + ["xmm0 = {0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 " + "0x89 0x8a 0x8b 0x8c 0x8d 0x8e 0x8f 0x90}"]) + self.match("register read xmm1", + ["xmm1 = {0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 " + "0x99 0x9a 0x9b 0x9c 0x9d 0x9e 0x9f 0xa0}"]) + @skipIfXmlSupportMissing @skipIfRemote @skipIfLLVMTargetMissing("X86") @@ -265,6 +277,18 @@ self.match("register read flags", ["eflags = 0x94939291"]) + # both stX and xmmX should be displayed as vectors + self.match("register read st0", + ["st0 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a}"]) + self.match("register read st1", + ["st1 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}"]) + self.match("register read xmm0", + ["xmm0 = {0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 " + "0x89 0x8a 0x8b 0x8c 0x8d 0x8e 0x8f 0x90}"]) + self.match("register read xmm1", + ["xmm1 = {0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 " + "0x99 0x9a 0x9b 0x9c 0x9d 0x9e 0x9f 0xa0}"]) + @skipIfXmlSupportMissing @skipIfRemote @skipIfLLVMTargetMissing("AArch64")