LLDB: Setting a breakpoint for malloc_error_break through the console

前端 未结 1 914
春和景丽
春和景丽 2021-02-15 00:57

I\'m running into some malloc-related issues in my code:

malloc: *** error for object 0x103401e28: incorrect checksum for freed object - object was probably modi         


        
相关标签:
1条回答
  • 2021-02-15 01:18

    If you are familiar with gdb, then this little cheat-sheet might help:

    http://lldb.llvm.org/lldb-gdb.html

    Also:

    (lldb) help break set
    

    will give you lots of information about setting breakpoints in lldb.

    In this case:

    (lldb) br set --name malloc_error_break
    (lldb) br set -n malloc_error_break
    

    or:

    (lldb) b malloc_error_break
    

    The first examples use breakpoint set which is a "true" lldb command - it uses flag options & values to distinguish the kinds of things you are trying to do. bis a synthetic command that attempts to roughly recreate the gdb breakpoint syntax.

    0 讨论(0)
提交回复
热议问题