[Lldb-commits] [PATCH] D14493: [MIPS][LLDB]Fix TestBreakpointCondition.py for MIPS

Nitesh Jain via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 9 01:39:06 PST 2015


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

The self.getArchitecture() returns the architecture based on the value of "-A" flag passed to dotest.py script. 
There are many possible values for MIPS to this option (like mips32r2, mips32r6, mips64, mips64r2,.... ). 
This patch uses re.match("mips",arch) to check if architecture string starts with mips.

Repository:
  rL LLVM

http://reviews.llvm.org/D14493

Files:
  packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py

Index: packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
@@ -103,12 +103,15 @@
         self.runCmd("breakpoint disable")
 
         self.runCmd("breakpoint set -p Loop")
-        if self.getArchitecture() in ['x86_64', 'i386']:
+        arch = self.getArchitecture()
+        if arch in ['x86_64', 'i386']:
             self.runCmd("breakpoint modify -c ($eax&&i)")
-        elif self.getArchitecture() in ['aarch64']:
+        elif arch in ['aarch64']:
             self.runCmd("breakpoint modify -c ($x1&&i)")
-        elif self.getArchitecture() in ['arm']:
+        elif arch in ['arm']:
             self.runCmd("breakpoint modify -c ($r0&&i)")
+        elif re.match("mips",arch):
+            self.runCmd("breakpoint modify -c ($r2&&i)")
         self.runCmd("run")
 
         self.expect("process status", PROCESS_STOPPED,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14493.39668.patch
Type: text/x-patch
Size: 1182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151109/23000a55/attachment.bin>


More information about the lldb-commits mailing list