philsquared/Catch — Issue #61: Assembler Command Failed in catch_debugger.hpp Building for iOS on ARM
Author: crown-hill
Created: 2011-12-13 10:00:47+00:00
State: open

Trying out CATCH for an iOS project, I ran into a compiler error from catch_debugger.hpp

bad instruction `int $3'

It looks like the CATCH_PLATFORM_MAC is defined when compiling for iOS and the BreakIntoDebugger that is defined in that case does not work on ARM.

Unforutnetly I cannot suggest an alternative for iOS on ARM that will break into the debugger, but I recommend that CATCH use marcos to avoid this code for iOS and ARM. The __IPHONE_OS_VERSION_MIN_REQUIRED and __MAC_OS_X_VERSION_MIN_REQUIRED maros should work for detecting OS X vs. Mac, but what you probably really want to do here is specifically detect ARM. I'm not sure how best to do this. The __ARMEL__ and __ARM_NEON__ macros might be the right ones, but I haven't researched them well enough to say for sure.