[LLDB][MIPS] Fix TestMiExec.py failure
ClosedPublic

Authored by nitesh.jain on Apr 21 2017, 12:40 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM
nitesh.jain created this revision.Apr 21 2017, 12:40 AM
labath accepted this revision.Apr 21 2017, 2:10 AM

sounds reasonable

This revision is now accepted and ready to land.Apr 21 2017, 2:10 AM
ki.stfu requested changes to this revision.Apr 21 2017, 3:14 AM

Thanks for catching this! Could you update this CL to let me commit it?

packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
287–289 ↗(On Diff #96105)

Remove this.

306–313 ↗(On Diff #96105)

Please do like this.

325–336 ↗(On Diff #96105)
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\"")
packages/Python/lldbsuite/test/tools/lldb-mi/control/main.cpp
29–30 ↗(On Diff #96105)

Revert this

This revision now requires changes to proceed.Apr 21 2017, 3:14 AM
clayborg resigned from this revision.Apr 21 2017, 8:40 AM

Update diff as per suggestion.

nitesh.jain marked an inline comment as done.EditedApr 24 2017, 3:23 AM

Thanks for catching this! Could you update this CL to let me commit it?

Yes , Please commit it.

Thanks

This revision was automatically updated to reflect the committed changes.
ki.stfu added inline comments.Apr 27 2017, 4:34 AM
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
329

I mistyped there should be -exec-next,, and why you are not checking that it has stopped at the right line (as I suggested)?

nitesh.jain added inline comments.Apr 27 2017, 4:48 AM
lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
329

ohh. i just forgot to do that . I will update it

Hi Ki,

The changes has been committed (rL301537).

Thanks