[Lldb-commits] [lldb] r257946 - Fix TestDebugBreak.py.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 15 15:24:13 PST 2016


How about `lldb.eStopReasonException if osIsWindows() else
lldb.eStopReasonSignal`?

Seems like that should work for everyone?

On Fri, Jan 15, 2016 at 3:20 PM Siva Chandra <sivachandra at google.com> wrote:

> This fails for i386 (not enabled for x86_64 anyway):
>
> http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/10400
>
> If I replace lldb.eStopReasonException with lldb.eStopReasonSignal on
> my local machine, it works.
>
> On Fri, Jan 15, 2016 at 2:22 PM, Zachary Turner via lldb-commits
> <lldb-commits at lists.llvm.org> wrote:
> > Author: zturner
> > Date: Fri Jan 15 16:22:40 2016
> > New Revision: 257946
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=257946&view=rev
> > Log:
> > Fix TestDebugBreak.py.
> >
> > We can't assume that the main thread of an inferior has index 0,
> > even in a single-threaded app.
> >
> > Modified:
> >
>  lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
> >
> > Modified:
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
> > URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py?rev=257946&r1=257945&r2=257946&view=diff
> >
> ==============================================================================
> > ---
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
> (original)
> > +++
> lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
> Fri Jan 15 16:22:40 2016
> > @@ -26,13 +26,14 @@ class DebugBreakTestCase(TestBase):
> >
> >          # We've hit the first stop, so grab the frame.
> >          self.assertEqual(process.GetState(), lldb.eStateStopped)
> > -        thread = process.GetThreadAtIndex(0)
> > +        thread = lldbutil.get_stopped_thread(process,
> lldb.eStopReasonException)
> > +        self.assertIsNotNone(thread, "Unable to find thread stopped at
> the __debugbreak()")
> >          frame = thread.GetFrameAtIndex(0)
> >
> >          # We should be in funciton 'bar'.
> >          self.assertTrue(frame.IsValid())
> >          function_name = frame.GetFunctionName()
> > -        self.assertTrue('bar' in function_name)
> > +        self.assertTrue('bar' in function_name, "Unexpected function
> name {}".format(function_name))
> >
> >          # We should be able to evaluate the parameter foo.
> >          value = frame.EvaluateExpression('*foo')
> >
> >
> > _______________________________________________
> > lldb-commits mailing list
> > lldb-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160115/1597ee23/attachment.html>


More information about the lldb-commits mailing list