Debian Codegraph @

lldb/test/API/commands/frame/diagnose/array/TestArray.py

raw
1 """
2 Test the output of `frame diagnose` for an array access
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 TestArray(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_array(self):
18 self.build()
19 exe = self.getBuildArtifact("a.out")
20 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
21 self.runCmd("run", RUN_SUCCEEDED)
22 self.expect("thread list", "Thread should be stopped", substrs=["stopped"])
23 self.expect("frame diagnose", "Crash diagnosis was accurate", substrs=["a[10]"])