projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.7.57:
[sbcl.git]
/
src
/
runtime
/
interr.c
diff --git
a/src/runtime/interr.c
b/src/runtime/interr.c
index
e4df5ec
..
5734ac1
100644
(file)
--- a/
src/runtime/interr.c
+++ b/
src/runtime/interr.c
@@
-17,16
+17,17
@@
#include <stdarg.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdlib.h>
+#include "sbcl.h"
#include "arch.h"
#include "signal.h"
#include "runtime.h"
#include "arch.h"
#include "signal.h"
#include "runtime.h"
-#include "sbcl.h"
#include "interr.h"
#include "print.h"
#include "lispregs.h"
#include "genesis/static-symbols.h"
#include "genesis/vector.h"
#include "interr.h"
#include "print.h"
#include "lispregs.h"
#include "genesis/static-symbols.h"
#include "genesis/vector.h"
+#include "thread.h"
\f
/* the way that we shut down the system on a fatal error */
\f
/* the way that we shut down the system on a fatal error */
@@
-47,6
+48,15
@@
lose(char *fmt, ...)
{
va_list ap;
fprintf(stderr, "fatal error encountered in SBCL pid %d",getpid());
{
va_list ap;
fprintf(stderr, "fatal error encountered in SBCL pid %d",getpid());
+ /* freeze all the other threads, so we have a chance of debugging them
+ */
+ if(all_threads) {
+ struct thread *th1,*th=arch_os_get_current_thread();
+ for_each_thread(th1) {
+ if(th1!=th) kill(th1->pid,SIGSTOP);
+ }
+ }
+
if (fmt) {
fprintf(stderr, ":\n");
va_start(ap, fmt);
if (fmt) {
fprintf(stderr, ":\n");
va_start(ap, fmt);
@@
-104,7
+114,7
@@
describe_internal_error(os_context_t *context)
case sc_BaseCharReg:
ch = *os_context_register_addr(context, offset);
case sc_BaseCharReg:
ch = *os_context_register_addr(context, offset);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
if (offset&1)
ch = ch>>8;
ch = ch & 0xff;
if (offset&1)
ch = ch>>8;
ch = ch & 0xff;