From d9fa2b5487549b0b0951bdbbe7a7fcc27bb225ac Mon Sep 17 00:00:00 2001 From: Adrian McCarthy Date: Thu, 12 Nov 2015 21:16:15 +0000 Subject: Implement RegisterContext for Mini Dumps. Differential Revision: http://reviews.llvm.org/D14591 llvm-svn: 252950 --- .../functionalities/postmortem/minidump/TestMiniDump.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/postmortem') 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 2c7dd2b83d1..643b3b232e8 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py @@ -32,6 +32,20 @@ class MiniDumpTestCase(TestBase): stop_description = thread.GetStopDescription(256); self.assertTrue("0xc0000005" in stop_description); + @no_debug_info_test + def test_stack_info_in_mini_dump(self): + """Test that we can see the stack.""" + 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()) + def setUp(self): # Call super's setUp(). TestBase.setUp(self) -- cgit v1.2.3