Ticket #1022: boinc_6_10_58_darwin_10_6_4.patch
File boinc_6_10_58_darwin_10_6_4.patch, 3.7 KB (added by , 14 years ago) |
---|
-
lib/mac/QBacktrace.c
old new 1036 1036 1037 1037 err = 0; 1038 1038 switch (context->threadStateFlavor) { 1039 #if defined(__DARWIN_UNIX03) 1040 case PPC_THREAD_STATE: 1041 pc = ((const ppc_thread_state_t *) context->threadState)->__srr0; 1042 lr = ((const ppc_thread_state_t *) context->threadState)->__lr; 1043 r1 = ((const ppc_thread_state_t *) context->threadState)->__r1; 1044 break; 1045 case PPC_THREAD_STATE64: 1046 pc = ((const ppc_thread_state64_t *) context->threadState)->__srr0; 1047 lr = ((const ppc_thread_state64_t *) context->threadState)->__lr; 1048 r1 = ((const ppc_thread_state64_t *) context->threadState)->__r1; 1049 break; 1050 #else 1039 1051 case PPC_THREAD_STATE: 1040 1052 pc = ((const ppc_thread_state_t *) context->threadState)->srr0; 1041 1053 lr = ((const ppc_thread_state_t *) context->threadState)->lr; … … 1046 1058 lr = ((const ppc_thread_state64_t *) context->threadState)->lr; 1047 1059 r1 = ((const ppc_thread_state64_t *) context->threadState)->r1; 1048 1060 break; 1061 #endif 1049 1062 1050 1063 default: 1051 1064 err = EINVAL; … … 1571 1584 1572 1585 err = 0; 1573 1586 switch (context->threadStateFlavor) { 1574 #if def __LP64__1587 #if defined(__LP64__) || defined(__DARWIN_UNIX03) 1575 1588 case x86_THREAD_STATE64: 1576 1589 1577 1590 pc = ((const x86_thread_state64_t *) context->threadState)->__rip; … … 2475 2488 flavor = x86_THREAD_STATE32; 2476 2489 state = (x86_thread_state32_t *) calloc(1, sizeof(*state)); 2477 2490 if (state != NULL) { 2491 #if defined(__DARWIN_UNIX03) 2492 state->__eip = (uintptr_t) pc; 2493 state->__ebp = (uintptr_t) fp; 2494 #else 2478 2495 state->eip = (uintptr_t) pc; 2479 2496 state->ebp = (uintptr_t) fp; 2497 #endif 2480 2498 } 2481 2499 #elif TARGET_CPU_X86_64 2482 2500 x86_thread_state64_t * state; -
lib/mac/QCrashReport.c
old new 870 870 r28: 0x0188d650 r29: 0x01be92d8 r30: 0xbffff900 r31: 0x01be92e0 871 871 */ 872 872 fprintf(f, "%s crashed with PPC Thread State:\n", threadID); 873 #if ndef __LP64__873 #if !defined(__LP64__) && !defined(__DARWIN_UNIX03) 874 874 fprintf(f, " srr0: 0x%08x srr1: 0x%08x vrsave: 0x%08x\n", state->srr0, state->srr1, state->vrsave); 875 875 fprintf(f, " xer: 0x%08x lr: 0x%08x ctr: 0x%08x mq: 0x%08x\n", state->xer, state->lr, state->ctr, state->mq); 876 876 … … 934 934 */ 935 935 936 936 fprintf(f, "%s crashed with PPC Thread State:\n", threadID); 937 #if ndef __LP64__937 #if !defined(__LP64__) && !defined(__DARWIN_UNIX03) 938 938 fprintf(f, " srr0: 0x%016llx srr1: 0x%016llx vrsave: 0x%016x\n", state->srr0, state->srr1, state->vrsave); 939 939 fprintf(f, " cr: 0x%08x xer: 0x%016llx lr: 0x%016llx ctr: 0x%016llx\n", state->cr, state->xer, state->lr, state->ctr); 940 940 … … 998 998 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 999 999 */ 1000 1000 fprintf(f, "%s crashed with X86 Thread State (32-bit):\n", threadID); 1001 #if ndef __LP64__1001 #if !defined(__LP64__) && !defined(__DARWIN_UNIX03) 1002 1002 regBase = (const unsigned int *) &state->eax; 1003 1003 #else 1004 1004 regBase = (const unsigned int *) &state->__eax; … … 1054 1054 rip: 0x000000010000f1fe rfl: 0x0000000000010202 1055 1055 */ 1056 1056 fprintf(f, "%s crashed with X86 Thread State (64-bit):\n", threadID); 1057 #if ndef __LP64__1057 #if !defined(__LP64__) && !defined(__DARWIN_UNIX03) 1058 1058 regBase = (const unsigned long long *) &state->rax; 1059 1059 #else 1060 1060 regBase = (const unsigned long long *) &state->__rax;