Dump memory in lldb

As indicated on this site. When I want to dump memory in gdb.

Starting point 0x1000and end 0x2000.

For lldb start 0x1000and end 0x1200.

Is there a reason for this or just a mistake?


The main question is: how do I reset the memory area from 0x1000to 0x2000in lldb?

+3
source share
1 answer

The following works great for me:

    (lldb) memory read --outfile /tmp/mem.txt 0x6080000fe680 0x6080000fe680+1000

Resets 1000 bytes of memory from the specified start address in hexadecimal format in /tmp/mem.txt. Use -binary for binary format.

You can also use "count" to indicate how many bytes you want to discard:

    (lldb) memory read --outfile /tmp/mem.txt --count 1000 0x6080000fe680

Xcode "note1", :

    (lldb) memory read --outfile /tmp/mem.bin note1 note1+100

0x1000 Xcode ( " " ), - .

0x1200 0x2000 , , .

+7

All Articles