Branch: Tag:

1998-03-25

1998-03-25 04:38:35 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

attempt to make fatal() write normal backtraces whenever possible...

Rev: src/error.c:1.13

11:   #include "builtin_functions.h"   #include "array.h"   #include "object.h" + #include "main.h" + #include "builtin_functions.h"      #undef ATTRIBUTE   #define ATTRIBUTE(X)
161:   #endif       (void)VFPRINTF(stderr, fmt, args); -  /* Insert dump routine call here */ +  +  fprintf(stderr,"Attempting to dump backlog (may fail).\n"); +  +  d_flag=t_flag=0; +  push_text("Fatal error"); +  f_backtrace(0); +  f_aggregate(2); +  APPLY_MASTER("describe_backtrace",1); +  if(sp[-1].type==T_STRING) +  write_to_stderr(sp[-1].u.string->str, sp[-1].u.string->len); +     fflush(stderr);    abort();   }