pike.git / src / error.c

version» Context lines:

pike.git/src/error.c:15:   #include "array.h"   #include "object.h"   #include "main.h"   #include "builtin_functions.h"   #include "backend.h"   #include "operators.h"   #include "module_support.h"   #include "threads.h"   #include "gc.h"    - RCSID("$Id: error.c,v 1.77 2001/09/28 00:02:50 hubbe Exp $"); + RCSID("$Id: error.c,v 1.78 2001/11/08 23:34:28 nilsson Exp $");      #undef ATTRIBUTE   #define ATTRIBUTE(X)      /*    * Attempt to inhibit throwing of errors if possible.    * Used by exit_on_error() to avoid infinite sprintf() loops.    */   int Pike_inhibit_errors = 0;   
pike.git/src/error.c:41: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG   PMOD_EXPORT void check_recovery_context(void)   {    char foo;   #define TESTILITEST ((((char *)Pike_interpreter.recoveries)-((char *)&foo))*STACK_DIRECTION)    if(Pike_interpreter.recoveries && TESTILITEST > 0) {    fprintf(stderr, "Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n",    Pike_interpreter.recoveries, &foo,    DO_NOT_WARN((long)TESTILITEST)); -  fprintf(stderr, "Last recovery was added at %s:%d\n", -  Pike_interpreter.recoveries->file, -  Pike_interpreter.recoveries->line); +  fprintf(stderr, "Last recovery was added at %s\n", +  Pike_interpreter.recoveries->file);    fatal("Recoveries is out biking (Pike_interpreter.recoveries=%p, Pike_sp=%p, %ld)!\n",    Pike_interpreter.recoveries, &foo,    DO_NOT_WARN((long)TESTILITEST));    }       /* Add more stuff here when required */   }      PMOD_EXPORT void pike_gdb_breakpoint(void)   {   }   #endif      PMOD_EXPORT JMP_BUF *init_recovery(JMP_BUF *r DEBUG_LINE_ARGS)   {    check_recovery_context();   #ifdef PIKE_DEBUG -  r->line=line; -  r->file=file; -  OED_FPRINTF((stderr, "init_recovery(%p) %s:%d\n", r, file, line)); +  r->file=location; +  OED_FPRINTF((stderr, "init_recovery(%p) %s\n", r, location));   #endif    r->frame_pointer=Pike_fp;    r->stack_pointer=Pike_sp-Pike_interpreter.evaluator_stack;    r->mark_sp=Pike_mark_sp - Pike_interpreter.mark_stack;    r->previous=Pike_interpreter.recoveries;    r->onerror=0;    r->severity=THROW_ERROR;    Pike_interpreter.recoveries=r;    check_recovery_context();    return r;
pike.git/src/error.c:115:       pop_n_elems(Pike_sp - Pike_interpreter.evaluator_stack - Pike_interpreter.recoveries->stack_pointer);    Pike_mark_sp = Pike_interpreter.mark_stack + Pike_interpreter.recoveries->mark_sp;       while(Pike_interpreter.recoveries->onerror)    {    (*Pike_interpreter.recoveries->onerror->func)(Pike_interpreter.recoveries->onerror->arg);    Pike_interpreter.recoveries->onerror=Pike_interpreter.recoveries->onerror->previous;    }    + #if defined(DEBUG_MALLOC) && defined(PIKE_DEBUG) +  /* This will tell us where the value was caught (I hope) */ +  if(throw_value.type <= MAX_REF_TYPE) +  { +  debug_malloc_update_location(throw_value.u.refs, +  Pike_interpreter.recoveries->file); +  debug_malloc_touch(throw_value.u.refs); +  } + #endif +     longjmp(Pike_interpreter.recoveries->recovery,1);   }      PMOD_EXPORT void push_error(const char *description)   {    push_text(description);    f_backtrace(0);    f_aggregate(2);   }   
pike.git/src/error.c:562:       ERROR_STRUCT(generic,o)->backtrace=Pike_sp[-1].u.array;    Pike_sp--;    dmalloc_touch_svalue(Pike_sp);       free_svalue(& throw_value);    throw_value.type=PIKE_T_OBJECT;    throw_value.u.object=o;    throw_severity = THROW_ERROR;    in_error=0; +  +  dmalloc_touch_svalue(& throw_value); +     pike_throw(); /* Hope someone is catching, or we will be out of balls. */   }         PMOD_EXPORT DECLSPEC(noreturn) void throw_error_object(    struct object *o,    char *func,    struct svalue *base_sp, int args,    char *desc, ...) ATTRIBUTE((noreturn,format (printf, 5, 6)))   {