LLDB equivalent to GDB's “info malloc-history
” command?

后端 未结 3 1629
萌比男神i
萌比男神i 2020-12-12 13:55

I am trying to resolve a \"message sent to deallocated instance \" error in iOS.

3条回答
  •  一向
    一向 (楼主)
    2020-12-12 14:37

    See the LLDB-GDB command map (http://lldb.llvm.org/lldb-gdb.html) - you have to import a script, and the command is named malloc_info now. Obviously, malloc stack logging still needs to be turned on in the scheme options.

    (lldb) script import lldb.macosx.heap
    (lldb) malloc_info --stack-history 0x10010d680
    

    Unfortunately, it doesn't show dealloc's - didn't GDBs malloc-history show that as well?

提交回复
热议问题