[Openmcl-cvs-notifications] r13766 - /trunk/source/lisp-kernel/lisp-debug.c

rme at clozure.com rme at clozure.com
Tue Jun 1 18:43:25 UTC 2010


Author: rme
Date: Tue Jun  1 12:43:25 2010
New Revision: 13766

Log:
Make debug_identify_exception() do a little something on non-PPC
systems; enable "D" kernel debugger command.

In describe_memfault(), decode the siginfo_t arg in an attempt to provide
something quasi-informative for non-PPC systems.

When in batch mode, show the lisp memory areas before aborting.

Modified:
    trunk/source/lisp-kernel/lisp-debug.c

Modified: trunk/source/lisp-kernel/lisp-debug.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/lisp-debug.c (original)
+++ trunk/source/lisp-kernel/lisp-debug.c Tue Jun  1 12:43:25 2010
@@ -299,6 +299,38 @@
 	  dsisr & (1<<25) ? "Write" : "Read",
 	  dsisr & (1<<27) ? "protected" : "unmapped",
 	  addr);
+#else
+  fprintf(dbgout, "received signal %d; faulting address: %p\n",
+	  info->si_signo, info->si_addr);
+  if (info->si_code > 0) {
+    if (info->si_signo =3D=3D SIGSEGV) {
+      switch (info->si_code) {
+      case SEGV_MAPERR:
+	fprintf(dbgout, "address not mapped to object\n");
+	break;
+      case SEGV_ACCERR:
+	fprintf(dbgout, "invalid permissions for mapped object\n");
+	break;
+      default:
+	fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code);
+	break;
+      }
+    } else if (info->si_signo =3D=3D SIGBUS) {
+      switch (info->si_code) {
+      case BUS_ADRALN:
+	fprintf(dbgout, "invalid address alignment\n");
+	break;
+      case BUS_ADRERR:
+	fprintf(dbgout, "non-existent physical address");
+	break;
+      case BUS_OBJERR:
+	fprintf(dbgout, "object-specific hardware error");
+	break;
+      default:
+	fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code);
+      }
+    }
+  }
 #endif
 }
 =

@@ -644,6 +676,15 @@
   default:
     break;
   }
+#else
+  switch (arg) {
+  case SIGSEGV:
+  case SIGBUS:
+    describe_memfault(xp, info);
+    break;
+  default:
+    break;
+  }
 #endif
   return debug_continue;
 }
@@ -1033,13 +1074,13 @@
    DEBUG_COMMAND_FLAG_REQUIRE_XP | DEBUG_COMMAND_FLAG_EXCEPTION_ENTRY_ONLY,
    NULL,
    'A'},
+#endif
   {debug_identify_exception,
    "Describe the current exception in greater detail",
    DEBUG_COMMAND_FLAG_REQUIRE_XP | DEBUG_COMMAND_FLAG_EXCEPTION_ENTRY_ONLY=
 |
    DEBUG_COMMAND_FLAG_EXCEPTION_REASON_ARG,
    NULL,
    'D'},
-#endif
   {debug_show_registers, =

    "Show raw GPR/SPR register values", =

    DEBUG_COMMAND_FLAG_REQUIRE_XP,
@@ -1234,6 +1275,7 @@
       debug_lisp_registers(xp, info, 0);
       debug_show_fpu(xp, info, 0);
     }
+    debug_memory_areas(xp, info, 0);
     debug_backtrace(xp, info, 0);
 =

     abort();



More information about the Openmcl-cvs-notifications mailing list