39 lines · python
1"""2The evaluating printf(...) after break stop and then up a stack frame.3"""4 5 6import lldb7from lldbsuite.test.decorators import *8from lldbsuite.test.lldbtest import *9from lldbsuite.test import lldbutil10 11 12class Radar9531204TestCase(TestBase):13 # rdar://problem/953120414 def test_expr_commands(self):15 """The evaluating printf(...) after break stop and then up a stack frame."""16 self.build()17 18 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)19 20 lldbutil.run_break_set_by_symbol(21 self, "foo", sym_exact=True, num_expected_locations=122 )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/953120432 # "Error dematerializing struct" error when evaluating expressions "up" on the stack33 self.runCmd("up") # frame select -r 134 35 self.runCmd("frame variable")36 37 # This does not currently.38 self.runCmd('expression (int)printf("argc is: %d.\\n", argc)')39