[Lldb-commits] [PATCH] D13859: [LLDB][LLGS Test] Check length of register, only when its available

Mohit Bhakkad via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 04:45:24 PDT 2015

mohit.bhakkad created this revision.
mohit.bhakkad added reviewers: clayborg, zturner.
mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.

Some machines of an arch may not have all the regs listed for it in RegInfo, and we get 'E15' as error while reading from such register, i.e. its not available.

For example MSA registers listed for MIPS are not present in all MIPS boards.




Index: test/tools/lldb-server/TestLldbGdbServer.py
--- test/tools/lldb-server/TestLldbGdbServer.py
+++ test/tools/lldb-server/TestLldbGdbServer.py
@@ -667,7 +667,8 @@
             # Verify the response length.
             p_response = context.get("p_response")
-            self.assertEquals(len(p_response), 2 * int(reg_info["bitsize"]) / 8)
+            if (p_response != 'E15'): # Check if register is available
+                self.assertEquals(len(p_response), 2 * int(reg_info["bitsize"]) / 8)
             # Increment loop
             reg_index += 1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13859.37735.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151019/b164c471/attachment.bin>

More information about the lldb-commits mailing list