Lldb Xcode: error: 'printf' is not a valid command

I am using Xcode 4.3.3 and I want to set symbolic endpoints. I created a symbolic breakpoint for all objc_msgSend characters, and I wanted to combine it with the "debugger output".

I followed the advice of this post in SO . However, in my debugger, the message

error: 'printf' is not a valid command.

appears. Any clue? I want for each function to call the [Class Method] message to print in the debugger area. Like this

[UIApplication sharedApplication]
[UIApplication _isClassic]
[NSCFString getCString:maxLength:encoding:]
[UIApplication class]
[SLSMoleculeAppDelegate isSubclassOfClass:]
[SLSMoleculeAppDelegate initialize]
0
source share
1 answer

It works with lldb if you prefix "expr" to the debugger command in the breakpoint settings:

expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) )

, " " :

[OS_xpc_dictionary, _xref_dispose]
<no result>
[NSObject, initialize]
<no result>
[OS_object, initialize]
<no result>

, " ", , , . .

+3

All Articles