次のような LLDB エイリアス ps を作成したい
ps foo
になる
print [self foo]
私は LLDB トーク (iTunes の WWDC セッション 321) を見てきましたが、それに基づいて、それを行うためのエイリアスは次のようになります。
command alias ps print [ self %1 ]
しかし、うまくいきません。ここでは、アプリのデリゲートに、整数を返す単純な「count」メソッドを指定しました。
(lldb) command alias ps print [ self %1 ]
(lldb) ps count
error: invalid operands to binary expression ('AppDelegate *' and 'int')
error: 1 errors parsing expression
(lldb) print [ self count ]
(int) $6 = 2
(lldb)
私は何が欠けていますか?