<div dir="ltr">What's the extra frame? Why does Python have an effect on the number of frames seen by the minidump? Something seems wrong about that.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 8, 2016 at 3:41 PM Adrian McCarthy <<a href="mailto:amccarth@google.com">amccarth@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">amccarth created this revision.<br>
amccarth added a reviewer: zturner.<br>
amccarth added a subscriber: lldb-commits.<br>
<br>
Under Python 3, lldb sees an extra frame on the stack, so I check that the stack has at least the number frames we expect.<br>
<br>
Python 3 doesn't have dict.iteritems(). I used a wrapper function from six to keep this portable between the two versions.<br>
<br>
<a href="http://reviews.llvm.org/D16017" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16017</a><br>
<br>
Files:<br>
packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py<br>
<br>
Index: packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py<br>
===================================================================<br>
--- packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py<br>
+++ packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py<br>
@@ -3,7 +3,7 @@<br>
"""<br>
<br>
from __future__ import print_function<br>
-<br>
+from six import iteritems<br>
<br>
<br>
import lldb<br>
@@ -83,8 +83,8 @@<br>
thread = process.GetThreadAtIndex(0)<br>
<br>
expected_stack = { 0: 'bar', 1: 'foo', 2: 'main' }<br>
- self.assertEqual(thread.GetNumFrames(), len(expected_stack))<br>
- for index, name in expected_stack.iteritems():<br>
+ self.assertGreaterEqual(thread.GetNumFrames(), len(expected_stack))<br>
+ for index, name in iteritems(expected_stack):<br>
frame = thread.GetFrameAtIndex(index)<br>
self.assertTrue(frame.IsValid())<br>
function_name = frame.GetFunctionName()<br>
<br>
<br>
</blockquote></div>