1 | #import <Foundation/Foundation.h> |
2 | #include <vector> |
3 | |
4 | int main (int argc, char const *argv[]) |
5 | { |
6 | std::vector<int> v{1,2,3,4,5}; |
7 | NSArray *a = @[@"Hello" ,@"World" ,@"From Me" ]; |
8 | return 0; //% v = self.frame().FindVariable("v"); v0 = v.GetChildAtIndex(0); s = lldb.SBStream(); v0.GetExpressionPath(s); |
9 | //% self.runCmd("expr %s = 12" % s.GetData()); self.assertTrue(v0.GetValueAsUnsigned() == 12, "value change via expr failed") |
10 | //% a = self.frame().FindVariable("a"); a1 = a.GetChildAtIndex(1); s = lldb.SBStream(); a1.GetExpressionPath(s); |
11 | //% self.expect("po %s" % s.GetData(), substrs = ["World"]) |
12 | } |
13 | |