lldb dump memory

作者: 谢昆明 | 来源:发表于2017-03-25 14:42 被阅读387次

The following works fine for me:

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

Dumps 1000 bytes of memory, from the given start address, in hex format, to /tmp/mem.txt. Use --binary for binary format.

You could also use 'count' to state how many bytes you want to dump:

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

If you are in Xcode debugging environment and have a variable named 'note1', you can also use:

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

Reads at the actual location 0x1000 fail in Xcode for me ("memory read failed"), must be protected in some way.

As to the difference between 0x1200 and 0x2000 in the documentation, I think it's simply a small mistake.
问#打赏
如果这篇文章解决了您的问题,让我买根烟抽抽。

支付宝.jpg 微信.jpg

相关文章

网友评论

    本文标题:lldb dump memory

    本文链接:https://www.haomeiwen.com/subject/itjlnttx.html