1""" 2The evaluating printf(...) after break stop and then up a stack frame. 3""" 4 5 6 7import lldb 8from lldbsuite.test.decorators import * 9from lldbsuite.test.lldbtest import * 10from lldbsuite.test import lldbutil 11 12 13class Radar9531204TestCase(TestBase): 14 15 mydir = TestBase.compute_mydir(__file__) 16 17 # rdar://problem/9531204 18 @expectedFailureNetBSD 19 def test_expr_commands(self): 20 """The evaluating printf(...) after break stop and then up a stack frame.""" 21 self.build() 22 23 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) 24 25 lldbutil.run_break_set_by_symbol( 26 self, 'foo', sym_exact=True, num_expected_locations=1) 27 28 self.runCmd("run", RUN_SUCCEEDED) 29 30 self.runCmd("frame variable") 31 32 # This works fine. 33 self.runCmd('expression (int)printf("value is: %d.\\n", value);') 34 35 # rdar://problem/9531204 36 # "Error dematerializing struct" error when evaluating expressions "up" on the stack 37 self.runCmd('up') # frame select -r 1 38 39 self.runCmd("frame variable") 40 41 # This does not currently. 42 self.runCmd('expression (int)printf("argc is: %d.\\n", argc)') 43