c49c80791af8a34214cedf3eaa22eb57ac12f786
[openbsd] /
1 """
2 Test the output of `frame diagnose` for dereferencing a function's return value
3 """
4
5
6 import lldb
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
10
11
12 class TestDiagnoseDereferenceFunctionReturn(TestBase):
13     mydir = TestBase.compute_mydir(__file__)
14
15     @skipUnlessDarwin
16     @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
17     @expectedFailureAll(oslist=['macosx'], archs=['i386'], bugnumber="rdar://28656408")
18     def test_diagnose_dereference_function_return(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(
27             "frame diagnose",
28             "Crash diagnosis was accurate",
29             substrs=[
30                 "GetAFoo",
31                 "->b"])