A project for inspecting the memory when Object Oriented vs Data Oriented methodologies are used.
clang++ -g -o p main.cpp
lldb p
(lldb) run
(lldb) image dump line-table main.cpp
(lldb) b main.cpp:4
The program uses pointer to get the address of the array.
- This reads 32 bytes of memory
(lldb) memory read [address]
- This reads n bytes of memory
(lldb) memory read [address] [address+n]
- This reads memory in hex format
(lldb) memory read -fx [address]
- Play with this
(lldb) memory read -fx -s4 -c4 [address]