1""" 2Test the output of `frame diagnose` for an array access 3""" 4 5 6import lldb 7from lldbsuite.test.decorators import * 8from lldbsuite.test.lldbtest import * 9from lldbsuite.test import lldbutil 10 11 12class TestArray(TestBase): 13 14 @skipUnlessDarwin 15 @skipIf(archs=no_match(['x86_64'])) # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64 16 def test_array(self): 17 self.build() 18 exe = self.getBuildArtifact("a.out") 19 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET) 20 self.runCmd("run", RUN_SUCCEEDED) 21 self.expect("thread list", "Thread should be stopped", 22 substrs=['stopped']) 23 self.expect( 24 "frame diagnose", 25 "Crash diagnosis was accurate", 26 substrs=["a[10]"]) 27