From 93d7ab9d8255b63cd3af7f9d7727917699f0b964 Mon Sep 17 00:00:00 2001 From: Nitesh Jain Date: Thu, 27 Apr 2017 10:21:46 +0000 Subject: [LLDB][MIPS] Fix TestMiExec.py failure. Reviewers: ki.stfu, labath Subscribers: jaydeep, bhushan, lldb-commits, slthakur Differential Revision: https://reviews.llvm.org/D32340 llvm-svn: 301530 --- .../Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py') diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py index b4e90c71721..7bbeb1546d5 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py @@ -319,8 +319,14 @@ class MiExecTestCase(lldbmi_testcase.MiTestCaseBase): # -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) -- cgit v1.2.3