xcode – 如何记录自定义LLDB命令(别名)?

xcode – 如何记录自定义LLDB命令(别名)?,第1张

概述在GDB中(通常在.gdbinit文件中)我用来记录我添加的自定义命令,如下所示: define parg <-- this define my custom commandp *($arg0*)($ebp+8+(4*$arg1)) <--- what in doesenddocument parg <--- HERE IS THE COMMENT / DOCUMENTA 在GDB中(通常在.gdbinit文件中)我用来记录我添加的自定义命令,如下所示:

define parg    <-- this define my custom commandp *($arg0*)($ebp+8+(4*$arg1))     <--- what in doesenddocument parg   <--- HERE IS THE COMMENT / documentATION ON THIS CUSTOM COMMANDPrints current function argumentsparg <type> <index>Prints the <index>th argument of the current function as type <type><index> is 0-basedend

我知道如何在LLDB中添加命令(命令别名…),但我该如何记录它?

解决方法 记录命令别名没有任何余地 – 它们通常非常简单,对它们运行“帮助”将显示它们扩展到的内容 – 但是如果在python中定义命令,则可以向该命令添加文档.例如,

(lldb) scriptPython Interactive Interpreter. To exit,type 'quit()','exit()' or Ctrl-D.>>> def say_hello(deBUGger,command,result,dict):...   print 'hello!'...   description = '''This command says hello.'''...   usage = 'usage: say_hello'... >>> ^D(lldb) command script add -f say_hello say_hello(lldb) say_hellohello!(lldb) help say_hello   Run Python function say_hello  This command takes 'raw' input (no need to quote stuff).Syntax: say_hello(lldb)

注意第四行“…”行,我在空行上按下返回.

有关lldb中python脚本的更多信息,请参阅http://lldb.llvm.org/python-reference.html

但不,你的问题的答案是你今天不能记录命令别名.

总结

以上是内存溢出为你收集整理的xcode – 如何记录自定义LLDB命令(别名)?全部内容,希望文章能够帮你解决xcode – 如何记录自定义LLDB命令(别名)?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1008155.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存