optimization - stepping may behave oddly : iOS/Unity

前端 未结 2 754
栀梦
栀梦 2021-02-19 23:17

I am trying to integrate unity to iOS application. I have followed this tutorial http://www.agnosticdev.com/blog-entry/swift/integrating-unity-and-vuforia-ios-swift-project

相关标签:
2条回答
  • 2021-02-20 00:00

    The code you're debugging is IL2CPP code, which is likely in a library prebuilt with optimizations (probably in libiPhone-lib.a). Your build settings only effect the code being compiled now in your xcode project, so they wouldn't effect a prebuilt lib. To get rid of the warning, you will need to rebuild that library, and you will need Unity source code to do that.

    More importantly, it's not the cause of the crash. It's just telling you that it's going to be harder to find the source of the crash.

    It looks like it's calling a function called LoadMetadataFile and crashing when accessing the return. You can probably set a breakpoint on that function call and see what's going in and out of it to find the next debugging step (the bl instructions 5 lines above the highlighted crashing line).

    Here are some documents that might help you: Apples calling convention docs: https://developer.apple.com/library/content/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html

    Arm instruction reference (opened to the crashing instruction): http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802a/LDRSW_imm.html

    0 讨论(0)
  • 2021-02-20 00:09

    I had the same issue and I solve it adding to Apple LLVM - Custom Compiler FLags:

    Other C Flags: -DRUNTIME_IL2CPP=1

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