Index: /trunk/source/lisp-kernel/lisp-debug.c
===================================================================
--- /trunk/source/lisp-kernel/lisp-debug.c	(revision 14483)
+++ /trunk/source/lisp-kernel/lisp-debug.c	(revision 14484)
@@ -1421,7 +1421,6 @@
     }
     debug_memory_areas(xp, info, 0);
+    debug_show_lisp_version(xp, info, 0);
     debug_backtrace(xp, info, 0);
-    debug_show_lisp_version(xp, info, 0);
-
     abort();
   }
Index: /trunk/source/lisp-kernel/xlbt.c
===================================================================
--- /trunk/source/lisp-kernel/xlbt.c	(revision 14483)
+++ /trunk/source/lisp-kernel/xlbt.c	(revision 14484)
@@ -17,4 +17,5 @@
 #include "lispdcmd.h"
 #include <stdio.h>
+#include <signal.h>
 
 
@@ -105,5 +106,5 @@
     } else {
       if (start->backlink) {
-        fprintf(dbgout, "Bogus  frame %lx\n", start);
+        fprintf(dbgout, "Bogus frame %lx\n", start);
       }
       return;
@@ -155,4 +156,19 @@
   } else {
     fprintf(dbgout, "current thread: tcr = 0x" LISP ", native thread ID = 0x" LISP ", interrupts %s\n", tcr, tcr->native_thread_id, ilevel);
+
+#ifndef WINDOWS
+    if (lisp_global(BATCH_FLAG)) {
+      /*
+       * In batch mode, we will be exiting.  Reset some signal actions
+       * to the default to avoid a loop of "Unhandled exception 11" or
+       * whatever if we try to print some call stack that is totally
+       * screwed up.  (Instead, we'll just die horribly and get it
+       * over with.)
+       */
+      signal(SIGBUS, SIG_DFL);
+      signal(SIGSEGV, SIG_DFL);
+    }
+#endif
+
     walk_stack_frames((lisp_frame *) ptr_from_lispobj(current_fp), (lisp_frame *) (vs_area->high));
     /*      walk_other_areas();*/
@@ -164,8 +180,4 @@
 plbt(ExceptionInformation *xp)
 {
-#ifdef X8632
-  plbt_sp(xpGPR(xp,Iebp));
-#else
-  plbt_sp(xpGPR(xp,Irbp));
-#endif
+  plbt_sp(xpGPR(xp, Ifp));
 }
