Index: /trunk/source/lisp-kernel/lisp-debug.c
===================================================================
--- /trunk/source/lisp-kernel/lisp-debug.c	(revision 13764)
+++ /trunk/source/lisp-kernel/lisp-debug.c	(revision 13765)
@@ -505,4 +505,39 @@
 #endif
 
+char *
+area_code_name(int code)
+{
+  switch (code) {
+    case AREA_VOID: return "void";
+    case AREA_CSTACK: return "cstack";
+    case AREA_VSTACK: return "vstack";
+    case AREA_TSTACK: return "tstack";
+    case AREA_READONLY: return "readonly";
+    case AREA_WATCHED: return "watched";
+    case AREA_STATIC_CONS: return "static cons";
+    case AREA_MANAGED_STATIC: return "managed static";
+    case AREA_STATIC: return "static";
+    case AREA_DYNAMIC: return "dynamic";
+    default: return "unknown";
+  }
+}
+
+debug_command_return
+debug_memory_areas(ExceptionInformation *xp, siginfo_t *info, int arg)
+{
+  int i;
+  area *a, *header = all_areas;
+  char label[100];
+
+  fprintf(dbgout, "Lisp memory areas:\n");
+  fprintf(dbgout, "%20s %20s %20s\n", "code", "low", "high");
+  for (a = header->succ; a != header; a = a->succ) {
+    snprintf(label, sizeof(label), "%s (%d)", area_code_name(a->code),
+	     a->code >> fixnumshift);
+    fprintf(dbgout, "%20s %20p %20p\n", label, a->low, a->high);
+  }
+  return debug_continue;
+}
+
 debug_command_return
 debug_lisp_registers(ExceptionInformation *xp, siginfo_t *info, int arg)
@@ -1036,4 +1071,9 @@
    NULL,
    'T'},
+  {debug_memory_areas,
+   "Show memory areas",
+   0,
+   NULL,
+   'M'},
   {debug_win,
    "Exit from this debugger, asserting that any exception was handled",
@@ -1251,5 +1291,4 @@
   va_end(args);
   lisp_Debugger(xp, NULL, debug_entry_bug, true, s);
-
 }
 
