Xcode equivalent of ' __asm int 3 / DebugBreak() / Halt?

后端 未结 7 1383
予麋鹿
予麋鹿 2020-12-14 07:51

What\'s the instruction to cause a hard-break in Xcode? For example under Visual Studio I could do \'_asm int 3\' or \'DebugBreak()\'. Under some GCC implementations it\'s a

7条回答
  •  臣服心动
    2020-12-14 08:42

    There is also the following function that is available as cross platform straight Halt() alternative:

    #include 
    
    void abort(void);
    

    We use it in our cross platform engine for the iPhone implementation in case of fatal asserts. Cross platform across Nintendo DS/Wii/XBOX 360/iOS etc...

提交回复
热议问题