diff --git a/matrix/matrix-iOS/Matrix/WCCrashBlockMonitor/KSCrash/Recording/Tools/KSSnapshot.h b/matrix/matrix-iOS/Matrix/WCCrashBlockMonitor/KSCrash/Recording/Tools/KSSnapshot.h index ed3c31536..803dbfb82 100644 --- a/matrix/matrix-iOS/Matrix/WCCrashBlockMonitor/KSCrash/Recording/Tools/KSSnapshot.h +++ b/matrix/matrix-iOS/Matrix/WCCrashBlockMonitor/KSCrash/Recording/Tools/KSSnapshot.h @@ -25,21 +25,26 @@ extern "C" { #include // a lite version of STRUCT_MCONTEXT_L in KSMachineContext -#ifdef __arm64__ +#if defined(__arm64__) typedef struct { _STRUCT_ARM_EXCEPTION_STATE64 __es; _STRUCT_ARM_THREAD_STATE64 __ss; } KSCpuContext; -#elif __arm__ +#elif defined(__arm__) typedef struct { _STRUCT_ARM_EXCEPTION_STATE __es; _STRUCT_ARM_THREAD_STATE __ss; } KSCpuContext; -#elif __x86_64__ +#elif defined(__x86_64__) typedef struct { _STRUCT_X86_EXCEPTION_STATE64 __es; _STRUCT_X86_THREAD_STATE64 __ss; } KSCpuContext; +#elif defined(__i386__) +typedef struct { + _STRUCT_X86_EXCEPTION_STATE32 __es; + _STRUCT_X86_THREAD_STATE32 __ss; +} KSCpuContext; #endif // a lite version of KSMachineContext diff --git a/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/ObjectEvent/pthread_introspection.h b/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/ObjectEvent/pthread_introspection.h index e208f2152..01dd8b19c 100644 --- a/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/ObjectEvent/pthread_introspection.h +++ b/matrix/matrix-iOS/Matrix/WCMemoryStat/MemoryLogger/ObjectEvent/pthread_introspection.h @@ -29,7 +29,9 @@ struct pthread_stack_info { uintptr_t stackbot; }; +#if defined(__arm64__) || defined(__x86_64__) static_assert(sizeof(pthread_stack_info) == (1 << 11), "Not aligned!"); +#endif // maybe fail void memory_logging_pthread_introspection_hook_install(); diff --git a/matrix/matrix-iOS/makefile-MacOS b/matrix/matrix-iOS/makefile-MacOS index 121c839d5..80047850a 100644 --- a/matrix/matrix-iOS/makefile-MacOS +++ b/matrix/matrix-iOS/makefile-MacOS @@ -1,4 +1,4 @@ -TARGET_NAME = Matrix +TARGET_NAME = MatrixMac PRODUCT_NAME = Matrix PROJECT_DIR = ./Matrix PROJECT_NAME = $(PROJECT_DIR)/Matrix.xcodeproj diff --git a/matrix/matrix-iOS/makefile-iOS b/matrix/matrix-iOS/makefile-iOS index 2718d6b30..8775b6cd9 100644 --- a/matrix/matrix-iOS/makefile-iOS +++ b/matrix/matrix-iOS/makefile-iOS @@ -1,4 +1,4 @@ -TARGET_NAME = Matrix +TARGET_NAME = MatrixiOS PRODUCT_NAME = Matrix PROJECT_DIR = ./Matrix PROJECT_NAME = $(PROJECT_DIR)/Matrix.xcodeproj