1 """ 2 The evaluating printf(...) after break stop and then up a stack frame. 3 """ 4 5 import os, time 6 import unittest2 7 import lldb 8 from lldbtest import * 9 import lldbutil 10 11 class Radar9531204TestCase(TestBase): 12 13 mydir = os.path.join("expression_command", "radar_9531204") 14 15 # rdar://problem/9531204 16 def test_expr_commands(self): 17 """The evaluating printf(...) after break stop and then up a stack frame.""" 18 self.buildDefault() 19 20 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) 21 22 lldbutil.run_break_set_by_symbol (self, 'foo', sym_exact=True, num_expected_locations=1) 23 24 self.runCmd("run", RUN_SUCCEEDED) 25 26 self.runCmd("frame variable") 27 28 # This works fine. 29 self.runCmd('expression (int)printf("value is: %d.\\n", value);') 30 31 # rdar://problem/9531204 32 # "Error dematerializing struct" error when evaluating expressions "up" on the stack 33 self.runCmd('up') # frame select -r 1 34 35 self.runCmd("frame variable") 36 37 # This does not currently. 38 self.runCmd('expression (int)printf("argc is: %d.\\n", argc)') 39 40 41 if __name__ == '__main__': 42 import atexit 43 lldb.SBDebugger.Initialize() 44 atexit.register(lambda: lldb.SBDebugger.Terminate()) 45 unittest2.main() 46