Changeset 13766


Ignore:
Timestamp:
Jun 1, 2010, 5:43:25 PM (10 years ago)
Author:
rme
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/lisp-debug.c

    r13765 r13766  
    300300          dsisr & (1<<27) ? "protected" : "unmapped",
    301301          addr);
     302#else
     303  fprintf(dbgout, "received signal %d; faulting address: %p\n",
     304          info->si_signo, info->si_addr);
     305  if (info->si_code > 0) {
     306    if (info->si_signo == SIGSEGV) {
     307      switch (info->si_code) {
     308      case SEGV_MAPERR:
     309        fprintf(dbgout, "address not mapped to object\n");
     310        break;
     311      case SEGV_ACCERR:
     312        fprintf(dbgout, "invalid permissions for mapped object\n");
     313        break;
     314      default:
     315        fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code);
     316        break;
     317      }
     318    } else if (info->si_signo == SIGBUS) {
     319      switch (info->si_code) {
     320      case BUS_ADRALN:
     321        fprintf(dbgout, "invalid address alignment\n");
     322        break;
     323      case BUS_ADRERR:
     324        fprintf(dbgout, "non-existent physical address");
     325        break;
     326      case BUS_OBJERR:
     327        fprintf(dbgout, "object-specific hardware error");
     328        break;
     329      default:
     330        fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code);
     331      }
     332    }
     333  }
    302334#endif
    303335}
     
    645677    break;
    646678  }
     679#else
     680  switch (arg) {
     681  case SIGSEGV:
     682  case SIGBUS:
     683    describe_memfault(xp, info);
     684    break;
     685  default:
     686    break;
     687  }
    647688#endif
    648689  return debug_continue;
     
    10341075   NULL,
    10351076   'A'},
     1077#endif
    10361078  {debug_identify_exception,
    10371079   "Describe the current exception in greater detail",
     
    10401082   NULL,
    10411083   'D'},
    1042 #endif
    10431084  {debug_show_registers,
    10441085   "Show raw GPR/SPR register values",
     
    12351276      debug_show_fpu(xp, info, 0);
    12361277    }
     1278    debug_memory_areas(xp, info, 0);
    12371279    debug_backtrace(xp, info, 0);
    12381280
Note: See TracChangeset for help on using the changeset viewer.