18fb263b47be5675b28c8df9eb2aaa8dffd97bc9
[platform/upstream/llvm.git] /
1 """
2 Test the output of `frame diagnose` for calling virtual methods
3 """
4
5 from __future__ import print_function
6
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
11
12
13 class TestDiagnoseInheritance(TestBase):
14     mydir = TestBase.compute_mydir(__file__)
15
16     @skipUnlessDarwin
17     @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
18     def test_diagnose_inheritance(self):
19         TestBase.setUp(self)
20         self.build()
21         exe = self.getBuildArtifact("a.out")
22         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
23         self.runCmd("run", RUN_SUCCEEDED)
24         self.expect("thread list", "Thread should be stopped",
25                     substrs=['stopped'])
26         self.expect("frame diagnose", "Crash diagnosis was accurate", "d")