Does LLDB have convenience variables ($var)?

前端 未结 3 1842
暗喜
暗喜 2021-01-30 13:03

Does LLDB have convenience variables? If so, how do I use them? If not, is there anything similar that I can use?

Reference: http://software.intel.com/sites/products/doc

3条回答
  •  离开以前
    2021-01-30 13:45

    I finally figured it out myself. Run help expr in LLDB and you will see:

    User defined variables: You can define your own variables for convenience or to be used in subsequent expressions. You define them the same way you would define variables in C. If the first character of your user defined variable is a $, then the variable's value will be available in future expressions, otherwise it will just be available in the current expression.

    So expr int $foo = 5 is what I want.

提交回复
热议问题