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,
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,
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits