Does LLDB have convenience variables ($var)?

前端 未结 3 1850
暗喜
暗喜 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:31

    Just use the form:

    (lldb) expr var
    

    From their tutorial:

    (lldb) expr self
    $0 = (SKTGraphicView *) 0x0000000100135430
    (lldb) expr self = 0x00
    $1 = (SKTGraphicView *) 0x0000000000000000
    

    You can also call functions:

    (lldb) expr (int) printf ("I have a pointer 0x%llx.\n", self)
    $2 = (int) 22
    I have a pointer 0x0.
    (lldb) expr self = $0
    $4 = (SKTGraphicView *) 0x0000000100135430
    

提交回复
热议问题