Changeset 5437


Ignore:
Timestamp:
Oct 31, 2006, 2:21:42 AM (18 years ago)
Author:
Gary Byers
Message:

handle_protection_violation: pass the tcr. Initialize "addr" before
testing it ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/ppc-exceptions.c

    r5366 r5437  
    846846
    847847OSStatus
    848 handle_protection_violation(ExceptionInformation *xp, siginfo_t *info)
     848handle_protection_violation(ExceptionInformation *xp, siginfo_t *info, TCR *tcr)
    849849{
    850850  BytePtr addr;
    851851  protected_area_ptr area;
    852852  protection_handler *handler;
    853   TCR *tcr = TCR_FROM_TSD(xpGPR(xp, rcontext));
    854853  extern Boolean touch_page(void *);
    855854  extern void touch_page_end(void);
     855
     856  if (info) {
     857    addr = (BytePtr)(info->si_addr);
     858  } else {
     859    addr = (BytePtr) ((natural) (xpDAR(xp)));
     860  }
    856861
    857862  if (addr && (addr == tcr->safe_ref_address)) {
     
    871876  }
    872877
    873   if (info) {
    874     addr = (BytePtr)(info->si_addr);
    875   } else {
    876     addr = (BytePtr) ((natural) (xpDAR(xp)));
    877   }
    878878  area = find_protected_area(addr);
    879879
     
    11751175  } else if ((xnum == SIGSEGV) ||
    11761176             (xnum == SIGBUS)) {
    1177     status = handle_protection_violation(xp, info);
     1177    status = handle_protection_violation(xp, info, tcr);
    11781178  } else if (xnum == SIGFPE) {
    11791179    status = handle_sigfpe(xp, tcr);
Note: See TracChangeset for help on using the changeset viewer.