大佬教程收集整理的这篇文章主要介绍了xcode – 如何使用lldb“memory find”命令?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Find a value in the memory of the process being debugged. Syntax: memory find <cmd-options> <address> <value> [<value> [...]] Command Options Usage: memory find <address> <value> [<value> [...]] memory find [-e <expr>] [-s <name>] [-c <count>] [-o <offset>] <address> <value> [<value> [...]] -c <count> ( --count <count> ) How many times to perform the search. -e <expr> ( --expression <expr> ) Evaluate an expression to obtain a byte pattern. -o <offset> ( --dump-offset <offset> ) When dumping memory for a match,an offset from the match LOCATIOn to start dumping from. -s <name> ( --String <name> ) Use text to find a byte pattern. This command takes options and free-form arguments. If your arguments resemble option specifiers (i.e.,they start with a - or --),you must use ' -- ' between the end of the command options and the beginning of the arguments.
我怀疑实现与帮助信息不匹配,因为我使用的任何语法我似乎得到各种神秘的错误消息之一,例如:
error: two addresses needed for memory find
要么
error: do not kNow how to deal with larger than 8 byte result types. pass a String instead
要么
error: please pass either a block of text,or an expression to evaluate.
我用Google搜索了一些用法示例,并且没有提出任何问题.如果有人有一个有效的例子,我将不胜感激.特别是我想从指针标识的块的开头搜索给定的字节数,以找到特定(字节)值的第一次出现(在这种情况下为255).
我在OS X上使用Xcode 7.0.1,而lldb版本是lldb-340.4.70.
我发现可以使-s选项起作用,例如像这样:
(lldb) me fi -s "f" -- ptr ptr+8192*256 Your data was found at LOCATIOn: 0x11033e20c 0x11033e20c: 66 bb 58 07 d0 b7 32 7d ff 7f 00 00 66 5b e7 82 f.X...2}....f[..
可能只是-e选项(这是我在这个例子中需要的)被破坏,例如:
(lldb) me fi -e 255 -- ptr ptr+8191*256 error: expression evaluation Failed. pass a String instead?
不幸的是,试图哄骗-s选项接受转义的十六进制或十进制值似乎也不起作用:
(lldb) me fi -s "\xff" -- ptr ptr+8191*256 Your data was not found within the range. (lldb) me fi -s "\255" -- ptr ptr+8191*256 Your data was not found within the range.
我无法对Xcode中此修复程序的可用性发表任何评论,但您可以尝试的一件事是从源代码编译LLDB并使用手工构建的LLDB和修复程序调试您的问题
以上是大佬教程为你收集整理的xcode – 如何使用lldb“memory find”命令?全部内容,希望文章能够帮你解决xcode – 如何使用lldb“memory find”命令?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。