xref: /llvm-project/lldb/test/API/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py (revision 0236cb689550ed2dac406443c652efb723cb2602)
1"""
2Test the output of `frame diagnose` for calling virtual methods
3"""
4
5
6import lldb
7from lldbsuite.test.decorators import *
8from lldbsuite.test.lldbtest import *
9from lldbsuite.test import lldbutil
10
11
12class TestDiagnoseInheritance(TestBase):
13    @expectedFailureAll(oslist=["windows"])
14    @skipIf(
15        archs=no_match(["x86_64"])
16    )  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
17    def test_diagnose_inheritance(self):
18        TestBase.setUp(self)
19        self.build()
20        exe = self.getBuildArtifact("a.out")
21        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
22        self.runCmd("run", RUN_SUCCEEDED)
23        self.expect("thread list", "Thread should be stopped", substrs=["stopped"])
24        self.expect("frame diagnose", "Crash diagnosis was accurate", substrs=["d"])
25