How to print the contents of a memory address using LLDB?

Adam Lee picture Adam Lee · Nov 3, 2013 · Viewed 41.4k times · Source

I am using LLDB and wondering how to print the contents of a specific memory address, for example 0xb0987654.

Answer

Eric picture Eric · Feb 25, 2014

Xcode has a very nice Memory Browser window, which will very nicely display the contents of memory addresses. It also lets you control byte grouping and number of bytes displayed, and move back or forward a memory page:

enter image description here

You can access it by pressing ⌘^⌥⇧M. After entering it, press enter to open the memory browser in the main editor.

or

Debug --> Debug Workflow --> View Memory

Notice the field on its bottom left corner where you can paste the memory address you want to inspect!

Documentation here: https://developer.apple.com/library/ios/recipes/xcode_help-debugger/articles/viewing_memory.html

Related answer here: How do I open the memory browser in Xcode 4?