Author: nitesh.jain
Date: Thu Apr 27 05:21:46 2017
New Revision: 301530

URL: http://llvm.org/viewvc/llvm-project?rev=301530&view=rev
Log:
[LLDB][MIPS] Fix TestMiExec.py failure.

Reviewers: ki.stfu, labath

Subscribers: jaydeep, bhushan, lldb-commits, slthakur

Differential Revision: https://reviews.llvm.org/D32340

Modified:
    
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py

Modified: 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py?rev=301530&r1=301529&r2=301530&view=diff
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py 
(original)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py 
Thu Apr 27 05:21:46 2017
@@ -319,8 +319,14 @@ class MiExecTestCase(lldbmi_testcase.MiT
         # -exec-step can keep us in the g_MyFunction for gcc
         self.runCmd("-exec-finish --frame 0")
         self.expect("\^running")
-        self.expect(
-            
"\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"30\"")
+        it = 
self.expect(["\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"30\"",
+                         
"\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"29\""])
+
+        if it == 1:
+            # Call to s_MyFunction may not follow immediately after 
g_MyFunction.
+            # There might be some instructions in between to restore 
caller-saved registers.
+            # We need to get past these instructions with a step to reach call 
to s_MyFunction.
+            self.runCmd("-exec-step --thread 1")
 
         # Test that -exec-step steps into s_MyFunction
         # (and that --frame is optional)


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to