[Lldb-commits] [PATCH] D32340: [LLDB][MIPS] Fix TestMiExec.py failure
Ilia K via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 21 03:14:42 PDT 2017
ki.stfu requested changes to this revision.
ki.stfu added a comment.
This revision now requires changes to proceed.
Thanks for catching this! Could you update this CL to let me commit it?
================
Comment at: packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py:287-289
+ self.g_MyFunction_line_no = line_number('main.cpp', "function_line_1")
+ self.s_MyFunction_line_no = line_number('main.cpp', "function_line_2")
+
----------------
Remove this.
================
Comment at: packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py:306-313
it = self.expect(["\*stopped,reason=\"end-stepping-range\".+?func=\"main\"",
"\*stopped,reason=\"end-stepping-range\".+?func=\"(?!main).+?\""])
# Exit from printf if needed
if it == 1:
self.runCmd("-exec-finish")
self.expect("\^running")
self.expect(
----------------
Please do like this.
================
Comment at: packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py:325-336
self.expect(
- "\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"30\"")
+ "\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"(30|29)\"")
+
+ finish_status = self.child.after
+ string_to_match = 'line="{0}"'.format(self.g_MyFunction_line_no)
+
+ # Call to s_MyFunction may not follow immediately after g_MyFunction.
----------------
```
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.
self.runCmd("-exec-step")
self.expect("\^running")
self.expect(
"\*stopped,reason=\"end-stepping-range\".+?main\.cpp\",line=\"30\"")
```
================
Comment at: packages/Python/lldbsuite/test/tools/lldb-mi/control/main.cpp:29-30
printf("start");
- g_MyFunction();
- s_MyFunction();
+ g_MyFunction(); // function_line_1
+ s_MyFunction(); // function_line_2
printf("exit");
----------------
Revert this
https://reviews.llvm.org/D32340
More information about the lldb-commits
mailing list