Exploring RAM contents
I would like to explore the contents of the RAM my application is using? I would like to see if I can find that string I allocated. Any suggestions to print out the entire contents of my application's memory to the terminal?
Solution 1:
To find the C string ”FooBar”
in your heap:
$ lldb PathToYourAppBundle/Contents/MacOS/YourAppName
(lldb) command script import lldb.macosx.heap
(lldb) r
- Pause execution with ControlC.
(lldb) cstr_refs -m FooBar