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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -