<div dir="ltr"><div>How about `lldb.eStopReasonException if osIsWindows() else lldb.eStopReasonSignal`?</div><div><br></div><div>Seems like that should work for everyone?</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 15, 2016 at 3:20 PM Siva Chandra <<a href="mailto:sivachandra@google.com">sivachandra@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fails for i386 (not enabled for x86_64 anyway):<br>
<a href="http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/10400" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/10400</a><br>
<br>
If I replace lldb.eStopReasonException with lldb.eStopReasonSignal on<br>
my local machine, it works.<br>
<br>
On Fri, Jan 15, 2016 at 2:22 PM, Zachary Turner via lldb-commits<br>
<<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br>
> Author: zturner<br>
> Date: Fri Jan 15 16:22:40 2016<br>
> New Revision: 257946<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=257946&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=257946&view=rev</a><br>
> Log:<br>
> Fix TestDebugBreak.py.<br>
><br>
> We can't assume that the main thread of an inferior has index 0,<br>
> even in a single-threaded app.<br>
><br>
> Modified:<br>
>     lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py<br>
><br>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py<br>
> URL: <a href="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" rel="noreferrer" target="_blank">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</a><br>
> ==============================================================================<br>
> --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py (original)<br>
> +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py Fri Jan 15 16:22:40 2016<br>
> @@ -26,13 +26,14 @@ class DebugBreakTestCase(TestBase):<br>
><br>
>          # We've hit the first stop, so grab the frame.<br>
>          self.assertEqual(process.GetState(), lldb.eStateStopped)<br>
> -        thread = process.GetThreadAtIndex(0)<br>
> +        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonException)<br>
> +        self.assertIsNotNone(thread, "Unable to find thread stopped at the __debugbreak()")<br>
>          frame = thread.GetFrameAtIndex(0)<br>
><br>
>          # We should be in funciton 'bar'.<br>
>          self.assertTrue(frame.IsValid())<br>
>          function_name = frame.GetFunctionName()<br>
> -        self.assertTrue('bar' in function_name)<br>
> +        self.assertTrue('bar' in function_name, "Unexpected function name {}".format(function_name))<br>
><br>
>          # We should be able to evaluate the parameter foo.<br>
>          value = frame.EvaluateExpression('*foo')<br>
><br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div>