Xcode 4: Can't use Enable Guard Malloc due to dylib error for iPad simulator

后端 未结 1 1914
北海茫月
北海茫月 2021-02-06 12:11

In Xcode 4.x I\'ve edited my Run scheme to \'Enable Guard Malloc\' since I have a nondescript malloc error I need to track down. I\'m aware I need to run in the simulator to use

相关标签:
1条回答
  • 2021-02-06 12:53

    To help with the debugging you can set MallocStackLogging, then when your App crashes, type this in the gdb console:

    (gdb) info malloc-history 0x543216
    

    Replace 0x543216 with the address of the object that caused the crash, and you will get a much more useful stack trace and it should help you pinpoint the exact line in your code that is causing the problem.

    See this article for more detailed instructions.

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