Changeset 13867
- Timestamp:
- Jun 21, 2010, 12:24:08 PM (14 years ago)
- Location:
- branches/qres/ccl
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
lisp-kernel/lisp-debug.c (modified) (8 diffs)
-
lisp-kernel/x86-exceptions.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/qres/ccl
- Property svn:mergeinfo changed
/trunk/source merged: 13765-13767,13770
- Property svn:mergeinfo changed
-
branches/qres/ccl/lisp-kernel/lisp-debug.c
r13096 r13867 300 300 dsisr & (1<<27) ? "protected" : "unmapped", 301 301 addr); 302 #elif defined(WINDOWS) 303 #else 304 fprintf(dbgout, "received signal %d; faulting address: %p\n", 305 info->si_signo, info->si_addr); 306 if (info->si_code > 0) { 307 if (info->si_signo == SIGSEGV) { 308 switch (info->si_code) { 309 case SEGV_MAPERR: 310 fprintf(dbgout, "address not mapped to object\n"); 311 break; 312 case SEGV_ACCERR: 313 fprintf(dbgout, "invalid permissions for mapped object\n"); 314 break; 315 default: 316 fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code); 317 break; 318 } 319 } else if (info->si_signo == SIGBUS) { 320 switch (info->si_code) { 321 case BUS_ADRALN: 322 fprintf(dbgout, "invalid address alignment\n"); 323 break; 324 case BUS_ADRERR: 325 fprintf(dbgout, "non-existent physical address"); 326 break; 327 case BUS_OBJERR: 328 fprintf(dbgout, "object-specific hardware error"); 329 break; 330 default: 331 fprintf(dbgout, "unexpected si_code value: %d\n", info->si_code); 332 } 333 } 334 } 302 335 #endif 303 336 } … … 505 538 #endif 506 539 540 char * 541 area_code_name(int code) 542 { 543 switch (code) { 544 case AREA_VOID: return "void"; 545 case AREA_CSTACK: return "cstack"; 546 case AREA_VSTACK: return "vstack"; 547 case AREA_TSTACK: return "tstack"; 548 case AREA_READONLY: return "readonly"; 549 case AREA_WATCHED: return "watched"; 550 #if 0 551 /* not in qres branch yet */ 552 case AREA_STATIC_CONS: return "static cons"; 553 #endif 554 case AREA_MANAGED_STATIC: return "managed static"; 555 case AREA_STATIC: return "static"; 556 case AREA_DYNAMIC: return "dynamic"; 557 default: return "unknown"; 558 } 559 } 560 561 debug_command_return 562 debug_memory_areas(ExceptionInformation *xp, siginfo_t *info, int arg) 563 { 564 int i; 565 area *a, *header = all_areas; 566 char label[100]; 567 568 fprintf(dbgout, "Lisp memory areas:\n"); 569 fprintf(dbgout, "%20s %20s %20s\n", "code", "low", "high"); 570 for (a = header->succ; a != header; a = a->succ) { 571 snprintf(label, sizeof(label), "%s (%d)", area_code_name(a->code), 572 a->code >> fixnumshift); 573 fprintf(dbgout, "%20s %20p %20p\n", label, a->low, a->high); 574 } 575 return debug_continue; 576 } 577 507 578 debug_command_return 508 579 debug_lisp_registers(ExceptionInformation *xp, siginfo_t *info, int arg) … … 610 681 break; 611 682 } 683 #else 684 switch (arg) { 685 case SIGSEGV: 686 case SIGBUS: 687 describe_memfault(xp, info); 688 break; 689 default: 690 break; 691 } 612 692 #endif 613 693 return debug_continue; … … 995 1075 NULL, 996 1076 'A'}, 1077 #endif 997 1078 {debug_identify_exception, 998 1079 "Describe the current exception in greater detail", … … 1001 1082 NULL, 1002 1083 'D'}, 1003 #endif1004 1084 {debug_show_registers, 1005 1085 "Show raw GPR/SPR register values", … … 1032 1112 NULL, 1033 1113 'T'}, 1114 {debug_memory_areas, 1115 "Show memory areas", 1116 0, 1117 NULL, 1118 'M'}, 1034 1119 {debug_win, 1035 1120 "Exit from this debugger, asserting that any exception was handled", … … 1191 1276 debug_show_fpu(xp, info, 0); 1192 1277 } 1278 debug_memory_areas(xp, info, 0); 1193 1279 debug_backtrace(xp, info, 0); 1194 1280 abort(); … … 1246 1332 va_end(args); 1247 1333 lisp_Debugger(xp, NULL, debug_entry_bug, true, s); 1248 1249 1334 } 1250 1335 -
branches/qres/ccl/lisp-kernel/x86-exceptions.c
r13070 r13867 1549 1549 #if 1 1550 1550 if (tcr->valence != TCR_STATE_LISP) { 1551 FBug(context, "exception in foreign context");1551 lisp_Debugger(context, info, signum, true, "exception in foreign context"); 1552 1552 } 1553 1553 #endif … … 1583 1583 #if 1 1584 1584 if (tcr->valence != TCR_STATE_LISP) { 1585 FBug(context, "exception in foreign context");1585 lisp_Debugger(context, info, signum, true, "exception in foreign context"); 1586 1586 } 1587 1587 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
