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 coturnix, 14 years ago)
  • lib/mac/QBacktrace.c

    old new  
    10361036       
    10371037    err = 0;
    10381038    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
    10391051        case PPC_THREAD_STATE:
    10401052            pc = ((const ppc_thread_state_t *) context->threadState)->srr0;
    10411053            lr = ((const ppc_thread_state_t *) context->threadState)->lr;
     
    10461058            lr = ((const ppc_thread_state64_t *) context->threadState)->lr;
    10471059            r1 = ((const ppc_thread_state64_t *) context->threadState)->r1;
    10481060            break;
     1061#endif
    10491062
    10501063        default:
    10511064            err = EINVAL;
     
    15711584       
    15721585    err = 0;
    15731586    switch (context->threadStateFlavor) {
    1574 #ifdef __LP64__
     1587#if defined(__LP64__) || defined(__DARWIN_UNIX03)
    15751588        case x86_THREAD_STATE64:
    15761589
    15771590            pc = ((const x86_thread_state64_t *) context->threadState)->__rip;
     
    24752488        flavor = x86_THREAD_STATE32;
    24762489        state = (x86_thread_state32_t *) calloc(1, sizeof(*state));
    24772490        if (state != NULL) {
     2491#if defined(__DARWIN_UNIX03)
     2492            state->__eip = (uintptr_t) pc;
     2493            state->__ebp = (uintptr_t) fp;
     2494#else
    24782495            state->eip = (uintptr_t) pc;
    24792496            state->ebp = (uintptr_t) fp;
     2497#endif
    24802498        }
    24812499    #elif TARGET_CPU_X86_64
    24822500        x86_thread_state64_t *  state;
  • lib/mac/QCrashReport.c

    old new  
    870870   r28: 0x0188d650  r29: 0x01be92d8  r30: 0xbffff900  r31: 0x01be92e0
    871871*/
    872872        fprintf(f, "%s crashed with PPC Thread State:\n", threadID);
    873 #ifndef __LP64__
     873#if !defined(__LP64__) && !defined(__DARWIN_UNIX03)
    874874        fprintf(f, "  srr0: 0x%08x srr1: 0x%08x                vrsave: 0x%08x\n", state->srr0, state->srr1, state->vrsave);
    875875        fprintf(f, "   xer: 0x%08x   lr: 0x%08x  ctr: 0x%08x   mq: 0x%08x\n", state->xer, state->lr, state->ctr, state->mq);
    876876
     
    934934*/
    935935
    936936        fprintf(f, "%s crashed with PPC Thread State:\n", threadID);
    937 #ifndef __LP64__
     937#if !defined(__LP64__) && !defined(__DARWIN_UNIX03)
    938938        fprintf(f, "  srr0: 0x%016llx srr1: 0x%016llx                        vrsave: 0x%016x\n", state->srr0, state->srr1, state->vrsave);
    939939        fprintf(f, "    cr: 0x%08x          xer: 0x%016llx   lr: 0x%016llx  ctr: 0x%016llx\n", state->cr, state->xer, state->lr, state->ctr);
    940940
     
    998998   ds: 0x0000001f     es: 0x0000001f  fs: 0x00000000  gs: 0x00000037
    999999*/
    10001000        fprintf(f, "%s crashed with X86 Thread State (32-bit):\n", threadID);
    1001 #ifndef __LP64__
     1001#if !defined(__LP64__) && !defined(__DARWIN_UNIX03)
    10021002        regBase = (const unsigned int *) &state->eax;
    10031003#else
    10041004        regBase = (const unsigned int *) &state->__eax;
     
    10541054  rip: 0x000000010000f1fe  rfl: 0x0000000000010202
    10551055*/
    10561056        fprintf(f, "%s crashed with X86 Thread State (64-bit):\n", threadID);
    1057 #ifndef __LP64__
     1057#if !defined(__LP64__) && !defined(__DARWIN_UNIX03)
    10581058        regBase = (const unsigned long long *) &state->rax;
    10591059#else
    10601060        regBase = (const unsigned long long *) &state->__rax;