Changeset 13 for trunk/src/helpers/except.c
- Timestamp:
- Nov 23, 2000, 7:36:41 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/except.c
r8 r13 299 299 ulOffset = 0; 300 300 fprintf(file, 301 " %-8s: %08 X ",301 " %-8s: %08lX ", 302 302 pszDescription, 303 303 ulAddress); … … 312 312 // error: 313 313 fprintf(file, 314 " %-8s:% d Error: DosQueryModFromEIP returned %d\n",314 " %-8s:%lu Error: DosQueryModFromEIP returned %lu\n", 315 315 szMod1, 316 316 ulObject, … … 322 322 323 323 fprintf(file, 324 " %-8s:% d",324 " %-8s:%lu ", 325 325 szMod1, 326 326 ulObject); … … 393 393 ) 394 394 { 395 fprintf(file, "\n %08 X: ",pulStackWord);395 fprintf(file, "\n %08lX: ", (ULONG)pulStackWord); 396 396 fprintf(file, "Page inaccessible"); 397 397 pulStackWord += 0x1000; … … 400 400 } 401 401 402 sprintf(szAddress, "%08 X",403 pulStackWord);402 sprintf(szAddress, "%08lX", 403 (ULONG)pulStackWord); 404 404 excPrintStackFrame(file, 405 405 szAddress, … … 416 416 * This calls excPrintStackFrame for each stack frame. 417 417 * 418 * If DEBUG_EXCPT_STACKDUMP is #define'd, this also dumps419 * the stack completely, which isn't that useful.420 *421 418 *@@changed V0.9.0 [umoeller]: added support for application hook 422 419 *@@changed V0.9.0 (99-11-02) [umoeller]: added TID to dump 423 420 *@@changed V0.9.2 (2000-03-10) [umoeller]: now using excPrintStackFrame 424 421 *@@changed V0.9.3 (2000-05-03) [umoeller]: fixed crashes 422 *@@changed V0.9.6 (2000-11-06) [umoeller]: added more register dumps 425 423 */ 426 424 … … 475 473 // generic exception info 476 474 fprintf(file, 477 "\n%s:\n Exception type: %08 X\n Address: %08X\n Params: ",475 "\n%s:\n Exception type: %08lX\n Address: %08lX\n Params: ", 478 476 pszHandlerName, 479 477 pReportRec->ExceptionNum, 480 pReportRec->ExceptionAddress);478 (ULONG)pReportRec->ExceptionAddress); 481 479 for (ul = 0; ul < pReportRec->cParameters; ul++) 482 480 { 483 fprintf(file, "%08 X ",481 fprintf(file, "%08lX ", 484 482 pReportRec->ExceptionInfo[ul]); 485 483 } … … 494 492 fprintf(file, "\nAccess violation: "); 495 493 if (pReportRec->ExceptionInfo[0] & XCPT_READ_ACCESS) 496 fprintf(file, "Invalid read access from 0x%04 X:%08X.\n",494 fprintf(file, "Invalid read access from 0x%04lX:%08lX.\n", 497 495 pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]); 498 496 else if (pReportRec->ExceptionInfo[0] & XCPT_WRITE_ACCESS) 499 fprintf(file, "Invalid write access to 0x%04 X:%08X.\n",497 fprintf(file, "Invalid write access to 0x%04lX:%08lX.\n", 500 498 pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]); 501 499 else if (pReportRec->ExceptionInfo[0] & XCPT_SPACE_ACCESS) 502 fprintf(file, "Invalid space access at 0x%04 X.\n",500 fprintf(file, "Invalid space access at 0x%04lX.\n", 503 501 pReportRec->ExceptionInfo[1]); 504 502 else if (pReportRec->ExceptionInfo[0] & XCPT_LIMIT_ACCESS) 505 503 fprintf(file, "Invalid limit access occurred.\n"); 506 504 else if (pReportRec->ExceptionInfo[0] == XCPT_UNKNOWN_ACCESS) 507 fprintf(file, "unknown at 0x%04 X:%08X\n",505 fprintf(file, "unknown at 0x%04lX:%08lX\n", 508 506 pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]); 509 507 fprintf(file, … … 586 584 "\n Process module: 0x%lX (%s)" 587 585 "\n Trapping module: 0x%lX (%s)" 588 "\n Object: % d\n",586 "\n Object: %lu\n", 589 587 ppib->pib_ulpid, 590 588 hMod1, szMod1, … … 594 592 fprintf(file, 595 593 "\nTrapping thread information:" 596 "\n Thread ID: 0x%lX (% d)"594 "\n Thread ID: 0x%lX (%lu)" 597 595 "\n Priority: 0x%lX\n", 598 596 ptib->tib_ptib2->tib2_ultid, ptib->tib_ptib2->tib2_ultid, … … 618 616 if (pContextRec->ContextFlags & CONTEXT_INTEGER) 619 617 { 618 // DS the following 4 added V0.9.6 (2000-11-06) [umoeller] 619 fprintf(file, "\n DS = %08lX ", pContextRec->ctx_SegDs); 620 excDescribePage(file, pContextRec->ctx_SegDs); 621 // ES 622 fprintf(file, "\n ES = %08lX ", pContextRec->ctx_SegEs); 623 excDescribePage(file, pContextRec->ctx_SegEs); 624 // FS 625 fprintf(file, "\n FS = %08lX ", pContextRec->ctx_SegFs); 626 excDescribePage(file, pContextRec->ctx_SegFs); 627 // GS 628 fprintf(file, "\n GS = %08lX ", pContextRec->ctx_SegGs); 629 excDescribePage(file, pContextRec->ctx_SegGs); 630 620 631 // EAX 621 fprintf(file, "\n EAX = %08 X ", pContextRec->ctx_RegEax);632 fprintf(file, "\n EAX = %08lX ", pContextRec->ctx_RegEax); 622 633 excDescribePage(file, pContextRec->ctx_RegEax); 623 634 // EBX 624 fprintf(file, "\n EBX = %08 X ", pContextRec->ctx_RegEbx);635 fprintf(file, "\n EBX = %08lX ", pContextRec->ctx_RegEbx); 625 636 excDescribePage(file, pContextRec->ctx_RegEbx); 626 637 // ECX 627 fprintf(file, "\n ECX = %08 X ", pContextRec->ctx_RegEcx);638 fprintf(file, "\n ECX = %08lX ", pContextRec->ctx_RegEcx); 628 639 excDescribePage(file, pContextRec->ctx_RegEcx); 629 640 // EDX 630 fprintf(file, "\n EDX = %08 X ", pContextRec->ctx_RegEdx);641 fprintf(file, "\n EDX = %08lX ", pContextRec->ctx_RegEdx); 631 642 excDescribePage(file, pContextRec->ctx_RegEdx); 632 643 // ESI 633 fprintf(file, "\n ESI = %08 X ", pContextRec->ctx_RegEsi);644 fprintf(file, "\n ESI = %08lX ", pContextRec->ctx_RegEsi); 634 645 excDescribePage(file, pContextRec->ctx_RegEsi); 635 646 // EDI 636 fprintf(file, "\n EDI = %08 X ", pContextRec->ctx_RegEdi);647 fprintf(file, "\n EDI = %08lX ", pContextRec->ctx_RegEdi); 637 648 excDescribePage(file, pContextRec->ctx_RegEdi); 638 649 fprintf(file, "\n"); … … 646 657 // *** instruction 647 658 648 fprintf(file, "Instruction pointer (where exception occured):\n CS:EIP = %04 X:%08X ",659 fprintf(file, "Instruction pointer (where exception occured):\n CS:EIP = %04lX:%08lX ", 649 660 pContextRec->ctx_SegCs, 650 661 pContextRec->ctx_RegEip); … … 653 664 // *** CPU flags 654 665 655 fprintf(file, "\n FLG = %08X", pContextRec->ctx_EFlags);666 fprintf(file, "\n EFLAGS = %08lX", pContextRec->ctx_EFlags); 656 667 657 668 /* … … 660 671 */ 661 672 662 fprintf(file, "\nStack:\n Base: %08X\n Limit: %08X", 663 (ptib ? ptib->tib_pstack : 0), 664 (ptib ? ptib->tib_pstacklimit :0)); 665 fprintf(file, "\n SS:ESP = %04X:%08X ", 666 pContextRec->ctx_SegSs, pContextRec->ctx_RegEsp); 673 fprintf(file, "\nStack:\n Base: %08lX\n Limit: %08lX", 674 (ULONG)(ptib ? ptib->tib_pstack : 0), 675 (ULONG)(ptib ? ptib->tib_pstacklimit : 0)); 676 fprintf(file, "\n SS:ESP = %04lX:%08lX ", 677 pContextRec->ctx_SegSs, 678 pContextRec->ctx_RegEsp); 667 679 excDescribePage(file, pContextRec->ctx_RegEsp); 668 680 669 fprintf(file, "\n EBP = %08 X ", pContextRec->ctx_RegEbp);681 fprintf(file, "\n EBP = %08lX ", pContextRec->ctx_RegEbp); 670 682 excDescribePage(file, pContextRec->ctx_RegEbp); 671 683
Note:
See TracChangeset
for help on using the changeset viewer.