Changeset 14487 for release


Ignore:
Timestamp:
Dec 15, 2010, 5:46:37 PM (9 years ago)
Author:
rme
Message:

Merge in some changes relevant to operating in batch mode.

  • show lisp version info in abnormal-application-exit
  • reset signal handlers for SIGSEGV and SIGBUS for kernel debugger backtrace

These are supposed to give us a little better chance of getting useful
information when a batch lisp crashes.

Location:
release/1.6/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/1.6/source

  • release/1.6/source/level-1/l1-readloop-lds.lisp

    r14381 r14487  
    476476  (ignore-errors
    477477    (print-call-history)
     478    (write-line (lisp-implementation-version) *debug-io*)
    478479    (force-output *debug-io*)
    479480    (quit -1))
  • release/1.6/source/lisp-kernel/lisp-debug.c

    r14352 r14487  
    14211421    }
    14221422    debug_memory_areas(xp, info, 0);
     1423    debug_show_lisp_version(xp, info, 0);
    14231424    debug_backtrace(xp, info, 0);
    1424     debug_show_lisp_version(xp, info, 0);
    1425 
    14261425    abort();
    14271426  }
  • release/1.6/source/lisp-kernel/xlbt.c

    r13067 r14487  
    1717#include "lispdcmd.h"
    1818#include <stdio.h>
     19#include <signal.h>
    1920
    2021
     
    105106    } else {
    106107      if (start->backlink) {
    107         fprintf(dbgout, "Bogus  frame %lx\n", start);
     108        fprintf(dbgout, "Bogus frame %lx\n", start);
    108109      }
    109110      return;
     
    155156  } else {
    156157    fprintf(dbgout, "current thread: tcr = 0x" LISP ", native thread ID = 0x" LISP ", interrupts %s\n", tcr, tcr->native_thread_id, ilevel);
     158
     159#ifndef WINDOWS
     160    if (lisp_global(BATCH_FLAG)) {
     161      /*
     162       * In batch mode, we will be exiting.  Reset some signal actions
     163       * to the default to avoid a loop of "Unhandled exception 11" or
     164       * whatever if we try to print some call stack that is totally
     165       * screwed up.  (Instead, we'll just die horribly and get it
     166       * over with.)
     167       */
     168      signal(SIGBUS, SIG_DFL);
     169      signal(SIGSEGV, SIG_DFL);
     170    }
     171#endif
     172
    157173    walk_stack_frames((lisp_frame *) ptr_from_lispobj(current_fp), (lisp_frame *) (vs_area->high));
    158174    /*      walk_other_areas();*/
     
    164180plbt(ExceptionInformation *xp)
    165181{
    166 #ifdef X8632
    167   plbt_sp(xpGPR(xp,Iebp));
    168 #else
    169   plbt_sp(xpGPR(xp,Irbp));
    170 #endif
     182  plbt_sp(xpGPR(xp, Ifp));
    171183}
Note: See TracChangeset for help on using the changeset viewer.