[Lldb-commits] [PATCH] D15182: [MIPS] Fix TestCrashDuringStep.py for MIPS
Jaydeep Patil via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 3 03:53:01 PST 2015
jaydeep created this revision.
jaydeep added a reviewer: clayborg.
jaydeep added subscribers: bhushan, sagar, mohit.bhakkad, nitesh.jain, lldb-commits.
jaydeep set the repository for this revision to rL LLVM.
Single stepping requires setting software breakpoint at address 0x0. This results in input/output error instead of SIGSEGV. Using “continue” instead of single stepping avoids setting of software breakpoint at address 0x0.
Repository:
rL LLVM
http://reviews.llvm.org/D15182
Files:
packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
Index: packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -43,9 +43,16 @@
thread = process.GetThreadAtIndex(0)
self.assertTrue(thread and thread.IsValid(), "Thread is valid")
- # Keep stepping until the inferior crashes
- while process.GetState() == lldb.eStateStopped and not lldbutil.is_thread_crashed(self, thread):
- thread.StepInstruction(False)
+ # Single stepping requires setting software breakpoint at address 0x0.
+ # This results in input/output error instead of SIGSEGV. Using "continue"
+ # instead of single stepping avoids setting of software breakpoint at address 0x0.
+ arch = self.getArchitecture()
+ if re.match("mips", arch):
+ self.runCmd("continue")
+ else:
+ # Keep stepping until the inferior crashes
+ while process.GetState() == lldb.eStateStopped and not lldbutil.is_thread_crashed(self, thread):
+ thread.StepInstruction(False)
self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
self.assertTrue(lldbutil.is_thread_crashed(self, thread), "Thread has crashed")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15182.41734.patch
Type: text/x-patch
Size: 1480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151203/e6e9eed1/attachment.bin>
More information about the lldb-commits
mailing list