From 86cf0856ae78c1d4e31a19b7fa0ab957379bee03 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 26 Oct 2017 19:08:34 +0000 Subject: Fix TestMinidump for r316673 The test was asserting that we can only find one frame in the minidump. Now that we have the default unwind plan from the ABI plugin, we are able to find 5 more frames using the frame pointer chaining. Correct the expectation in the test. llvm-svn: 316688 --- .../functionalities/postmortem/minidump/TestMiniDump.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py index b89a305d0e8..3227e1e6bbf 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -49,14 +49,14 @@ class MiniDumpTestCase(TestBase): self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp") self.assertEqual(self.process.GetNumThreads(), 1) thread = self.process.GetThreadAtIndex(0) - # The crash is in main, so there should be one frame on the stack. - self.assertEqual(thread.GetNumFrames(), 1) - frame = thread.GetFrameAtIndex(0) - self.assertTrue(frame.IsValid()) - pc = frame.GetPC() - eip = frame.FindRegister("pc") - self.assertTrue(eip.IsValid()) - self.assertEqual(pc, eip.GetValueAsUnsigned()) + + pc_list = [ 0x00164d14, 0x00167c79, 0x00167e6d, 0x7510336a, 0x77759882, 0x77759855] + + self.assertEqual(thread.GetNumFrames(), len(pc_list)) + for i in range(len(pc_list)): + frame = thread.GetFrameAtIndex(i) + self.assertTrue(frame.IsValid()) + self.assertEqual(frame.GetPC(), pc_list[i]) @skipUnlessWindows # Minidump saving works only on windows def test_deeper_stack_in_mini_dump(self): -- cgit v1.2.3