Using Say command on a breakpoint in Xcode -


i using xcode , set breakpoint speaks nsstring code. doing setting breakpoint, editing it. add "shell command" action. first argument say , second argument i'm having trouble.

 nsstring *mystring = @"this test"; 

if put @mystring@ second argument, reads out memory address. ex. 0x0b4be130

if try @[mystring utf8string], gives me memory address.

if dereference mystring, @*[mystring utf8string]@, gives me first character of string.

how do properly?

lldb has inbuilt python interpreter, entire lldb library exposed it. can access script debugger command. this, can more grab string representation of variable in frame, , send os command. add debugger action:

script os.system("say " + lldb.frame.getvalueforvariablepath("myvariable").description) 

to achieve want. can wrap python scripts new lldb "commands", can create debugger command called say explicitly says underlying objects description; have @ http://lldb.llvm.org/python-reference.html introduction on setting these type of scripts up.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -