I would like to view an array of elements pointed to by a pointer. In GDB this can be done by treating the pointed memory as an artificial array of a given length using the operator '@' as
*pointer @ length
where length
is the number of elements I want to view.
The above syntax does not work in LLDB supplied with Xcode 4.1.
Is there any way how to accomplish the above in LLDB?
The only way I found was via a Python scripting module:
Define a command "parray" in lldb:
Now you can use "parray variable length":
Well at that point, you may as well write your own custom C function and invoke it with: