[Lldb-commits] [lldb] r253444 - [MIPS][LLDB]Fix TestBreakpointCondition.py for MIPS

Sagar Thakur via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 18 00:12:34 PST 2015


Author: slthakur
Date: Wed Nov 18 02:12:34 2015
New Revision: 253444

URL: http://llvm.org/viewvc/llvm-project?rev=253444&view=rev
Log:
[MIPS][LLDB]Fix TestBreakpointCondition.py for MIPS

Patch by Nitesh Jain

Summary: 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.

Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Reviewers: clayborg, ovyalov
Differential: http://reviews.llvm.org/D14493

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py?rev=253444&r1=253443&r2=253444&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py Wed Nov 18 02:12:34 2015
@@ -103,12 +103,15 @@ class BreakpointConditionsTestCase(TestB
         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,




More information about the lldb-commits mailing list