iPhone Development - EXC_BAD_ACCESS error with no stack trace

后端 未结 6 1277
情书的邮戳
情书的邮戳 2021-01-02 21:45

Here\'s my case: I have a table view showing contacts. Add button in the navigation bar is used to load another view for data entry. This new view has images in table header

6条回答
  •  北海茫月
    2021-01-02 22:09

    Cameron Spickert's answer is a little deprecated, since Xcode uses lldb now instead of gdb. The link to the source article is also dead.

    The same thing can be done rather simply with the following lldb command:

    (lldb) thread backtrace
    

    This will show the bt for the current thread. If you want to change the thread from which you want to get the bt, select the frame and get it like this:

    (lldb) thread list
    (lldb) thread select 2
    (lldb) thread backtrace
    

    If you want to replicate the exact behavior of Cameron Spickert's answer, use the following commands:

    (lldb) expr unsigned int $eip = 0x1979c81d4
    (lldb) stepi
    (lldb) thread backtrace
    

    Source 1

    Source 2

提交回复
热议问题