Ignore:
Timestamp:
Oct 14, 2008, 6:30:00 PM (13 years ago)
Author:
gz
Message:

Merge/bootstrap assorted low level stuff from trunk - kernel, syscall stuff, lowmem-bias, formatting tweaks, a few bug fixes included

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/x86-exceptions.c

    r10944 r11089  
    251251        extern OSErr save_application(unsigned);
    252252        area *vsarea = tcr->vs_area;
    253        
     253
     254#ifdef WINDOWS 
     255        arg = _open_osfhandle(arg,0);
     256#endif
    254257        nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1);
    255258        err = save_application(arg);
     
    783786{
    784787#ifdef FREEBSD
     788#ifdef X8664
    785789  BytePtr addr = (BytePtr) xp->uc_mcontext.mc_addr;
     790#else
     791  BytePtr addr = (BytePtr) info->si_addr;
     792#endif
    786793#else
    787794#ifdef WINDOWS
     
    791798#endif
    792799#endif
     800
    793801
    794802  if (addr && (addr == tcr->safe_ref_address)) {
     
    921929{
    922930  if (info->si_code == 0) {
     931#ifdef X8664
    923932    struct savefpu *fpu = (struct savefpu *) &(xp->uc_mcontext.mc_fpstate);
     933#else
     934    struct savexmm *fpu = (struct savexmm *) &(xp->uc_mcontext.mc_fpstate);
     935#endif
    924936    uint32_t mxcsr = fpu->sv_env.en_mxcsr;
    925937
     
    18111823{
    18121824  LispObj foreign_rsp =
    1813     (LispObj) find_foreign_rsp(xpGPR(context,Isp), tcr->cs_area, tcr);
     1825    (LispObj) (tcr->foreign_sp - 128) & ~15;
    18141826  CONTEXT *new_context;
    18151827  siginfo_t *new_info;
     
    18321844windows_arbstack_exception_handler(EXCEPTION_POINTERS *exception_pointers)
    18331845{
     1846  extern void ensure_safe_for_string_operations(void);
    18341847  DWORD code = exception_pointers->ExceptionRecord->ExceptionCode;
     1848
     1849
    18351850 
    18361851  if ((code & 0x80000000L) == 0) {
     
    18421857    CONTEXT *context = exception_pointers->ContextRecord;
    18431858   
     1859    ensure_safe_for_string_operations();
     1860
    18441861    if ((current_sp >= cs->low) &&
    18451862        (current_sp < cs->high)) {
     1863      debug_show_registers(context, exception_pointers->ExceptionRecord, 0);
    18461864      FBug(context, "Exception on foreign stack\n");
    18471865    }
Note: See TracChangeset for help on using the changeset viewer.