Changeset 8004


Ignore:
Timestamp:
Jan 6, 2008, 7:54:55 AM (12 years ago)
Author:
gb
Message:

Set foreign_sp (at time of exception) and previous-xframe slots
of xcf when calling out to lisp.

File:
1 edited

Legend:

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

    r7868 r8004  
    315315
    316316LispObj
    317 create_exception_callback_frame(ExceptionInformation *xp)
     317create_exception_callback_frame(ExceptionInformation *xp, TCR *tcr)
    318318{
    319319  LispObj containing_uvector = 0,
     
    370370    relative_pc = abs_pc << fixnumshift;
    371371  }
    372  
     372  push_on_lisp_stack(xp,(LispObj)(tcr->xframe->prev));
     373  push_on_lisp_stack(xp,(LispObj)(tcr->foreign_sp));
    373374  push_on_lisp_stack(xp,tra);
    374375  push_on_lisp_stack(xp,(LispObj)xp);
     
    408409 
    409410  {
    410     LispObj xcf = create_exception_callback_frame(xp),
     411    LispObj xcf = create_exception_callback_frame(xp, tcr),
    411412      cmain = nrs_CMAIN.vcell;
    412413    int skip;
     
    458459    *save_vsp = (LispObj *)xpGPR(xp,Isp),
    459460    word_beyond_vsp = save_vsp[-1],
    460     xcf = create_exception_callback_frame(xp);
     461    xcf = create_exception_callback_frame(xp, tcr);
    461462  int save_errno = errno;
    462463 
     
    483484      finish_function_entry(xp);
    484485    }
    485     xcf0 = create_exception_callback_frame(xp);
     486    xcf0 = create_exception_callback_frame(xp, tcr);
    486487    skip = callback_to_lisp(tcr, errdisp, xp, xcf0, 0, 0, 0, 0);
    487488    if (skip == -1) {
     
    591592    soft = a->softprot;
    592593    unprotect_area(soft);
    593     xcf = create_exception_callback_frame(xp);
     594    xcf = create_exception_callback_frame(xp, tcr);
    594595    skip = callback_to_lisp(tcr, nrs_CMAIN.vcell, xp, xcf, SIGSEGV, on_TSP, 0, 0);
    595596    xpGPR(xp,Irbp) = save_rbp;
     
    642643    if ((fulltag_of(cmain) == fulltag_misc) &&
    643644      (header_subtag(header_of(cmain)) == subtag_macptr)) {
    644       xcf = create_exception_callback_frame(xp);
     645      xcf = create_exception_callback_frame(xp, tcr);
    645646      callback_to_lisp(tcr, cmain, xp, xcf, SIGBUS, is_write_fault(xp,info), (natural)addr, 0);
    646647    }
     
    660661  if ((fulltag_of(cmain) == fulltag_misc) &&
    661662      (header_subtag(header_of(cmain)) == subtag_macptr)) {
    662     xcf = create_exception_callback_frame(xp);
     663    xcf = create_exception_callback_frame(xp, tcr);
    663664    skip = callback_to_lisp(tcr, cmain, xp, xcf, SIGFPE, code, 0, 0);
    664665    xpPC(xp) += skip;
Note: See TracChangeset for help on using the changeset viewer.