Ignore:
Timestamp:
Nov 23, 2000, 7:36:41 PM (25 years ago)
Author:
umoeller
Message:

Updates for V0.9.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/except.c

    r8 r13  
    299299            ulOffset = 0;
    300300    fprintf(file,
    301             "    %-8s: %08X ",
     301            "    %-8s: %08lX ",
    302302            pszDescription,
    303303            ulAddress);
     
    312312        // error:
    313313        fprintf(file,
    314                 " %-8s:%d   Error: DosQueryModFromEIP returned %d\n",
     314                " %-8s:%lu   Error: DosQueryModFromEIP returned %lu\n",
    315315                szMod1,
    316316                ulObject,
     
    322322
    323323        fprintf(file,
    324                 " %-8s:%d   ",
     324                " %-8s:%lu   ",
    325325                szMod1,
    326326                ulObject);
     
    393393               )
    394394            {
    395                 fprintf(file, "\n    %08X: ", pulStackWord);
     395                fprintf(file, "\n    %08lX: ", (ULONG)pulStackWord);
    396396                fprintf(file, "Page inaccessible");
    397397                pulStackWord += 0x1000;
     
    400400        }
    401401
    402         sprintf(szAddress, "%08X",
    403                 pulStackWord);
     402        sprintf(szAddress, "%08lX",
     403                (ULONG)pulStackWord);
    404404        excPrintStackFrame(file,
    405405                           szAddress,
     
    416416 *      This calls excPrintStackFrame for each stack frame.
    417417 *
    418  *      If DEBUG_EXCPT_STACKDUMP is #define'd, this also dumps
    419  *      the stack completely, which isn't that useful.
    420  *
    421418 *@@changed V0.9.0 [umoeller]: added support for application hook
    422419 *@@changed V0.9.0 (99-11-02) [umoeller]: added TID to dump
    423420 *@@changed V0.9.2 (2000-03-10) [umoeller]: now using excPrintStackFrame
    424421 *@@changed V0.9.3 (2000-05-03) [umoeller]: fixed crashes
     422 *@@changed V0.9.6 (2000-11-06) [umoeller]: added more register dumps
    425423 */
    426424
     
    475473    // generic exception info
    476474    fprintf(file,
    477             "\n%s:\n    Exception type: %08X\n    Address:        %08X\n    Params:         ",
     475            "\n%s:\n    Exception type: %08lX\n    Address:        %08lX\n    Params:         ",
    478476            pszHandlerName,
    479477            pReportRec->ExceptionNum,
    480             pReportRec->ExceptionAddress);
     478            (ULONG)pReportRec->ExceptionAddress);
    481479    for (ul = 0;  ul < pReportRec->cParameters;  ul++)
    482480    {
    483         fprintf(file, "%08X  ",
     481        fprintf(file, "%08lX  ",
    484482                pReportRec->ExceptionInfo[ul]);
    485483    }
     
    494492            fprintf(file, "\nAccess violation: ");
    495493            if (pReportRec->ExceptionInfo[0] & XCPT_READ_ACCESS)
    496                 fprintf(file, "Invalid read access from 0x%04X:%08X.\n",
     494                fprintf(file, "Invalid read access from 0x%04lX:%08lX.\n",
    497495                        pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]);
    498496            else if (pReportRec->ExceptionInfo[0] & XCPT_WRITE_ACCESS)
    499                 fprintf(file, "Invalid write access to 0x%04X:%08X.\n",
     497                fprintf(file, "Invalid write access to 0x%04lX:%08lX.\n",
    500498                        pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]);
    501499            else if (pReportRec->ExceptionInfo[0] & XCPT_SPACE_ACCESS)
    502                 fprintf(file, "Invalid space access at 0x%04X.\n",
     500                fprintf(file, "Invalid space access at 0x%04lX.\n",
    503501                        pReportRec->ExceptionInfo[1]);
    504502            else if (pReportRec->ExceptionInfo[0] & XCPT_LIMIT_ACCESS)
    505503                fprintf(file, "Invalid limit access occurred.\n");
    506504            else if (pReportRec->ExceptionInfo[0] == XCPT_UNKNOWN_ACCESS)
    507                 fprintf(file, "unknown at 0x%04X:%08X\n",
     505                fprintf(file, "unknown at 0x%04lX:%08lX\n",
    508506                            pContextRec->ctx_SegDs, pReportRec->ExceptionInfo[1]);
    509507            fprintf(file,
     
    586584                    "\n    Process module:  0x%lX (%s)"
    587585                    "\n    Trapping module: 0x%lX (%s)"
    588                     "\n    Object: %d\n",
     586                    "\n    Object: %lu\n",
    589587                    ppib->pib_ulpid,
    590588                    hMod1, szMod1,
     
    594592            fprintf(file,
    595593                    "\nTrapping thread information:"
    596                     "\n    Thread ID:       0x%lX (%d)"
     594                    "\n    Thread ID:       0x%lX (%lu)"
    597595                    "\n    Priority:        0x%lX\n",
    598596                    ptib->tib_ptib2->tib2_ultid, ptib->tib_ptib2->tib2_ultid,
     
    618616        if (pContextRec->ContextFlags & CONTEXT_INTEGER)
    619617        {
     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
    620631            // EAX
    621             fprintf(file, "\n    EAX = %08X  ", pContextRec->ctx_RegEax);
     632            fprintf(file, "\n    EAX = %08lX  ", pContextRec->ctx_RegEax);
    622633            excDescribePage(file, pContextRec->ctx_RegEax);
    623634            // EBX
    624             fprintf(file, "\n    EBX = %08X  ", pContextRec->ctx_RegEbx);
     635            fprintf(file, "\n    EBX = %08lX  ", pContextRec->ctx_RegEbx);
    625636            excDescribePage(file, pContextRec->ctx_RegEbx);
    626637            // ECX
    627             fprintf(file, "\n    ECX = %08X  ", pContextRec->ctx_RegEcx);
     638            fprintf(file, "\n    ECX = %08lX  ", pContextRec->ctx_RegEcx);
    628639            excDescribePage(file, pContextRec->ctx_RegEcx);
    629640            // EDX
    630             fprintf(file, "\n    EDX = %08X  ", pContextRec->ctx_RegEdx);
     641            fprintf(file, "\n    EDX = %08lX  ", pContextRec->ctx_RegEdx);
    631642            excDescribePage(file, pContextRec->ctx_RegEdx);
    632643            // ESI
    633             fprintf(file, "\n    ESI = %08X  ", pContextRec->ctx_RegEsi);
     644            fprintf(file, "\n    ESI = %08lX  ", pContextRec->ctx_RegEsi);
    634645            excDescribePage(file, pContextRec->ctx_RegEsi);
    635646            // EDI
    636             fprintf(file, "\n    EDI = %08X  ", pContextRec->ctx_RegEdi);
     647            fprintf(file, "\n    EDI = %08lX  ", pContextRec->ctx_RegEdi);
    637648            excDescribePage(file, pContextRec->ctx_RegEdi);
    638649            fprintf(file, "\n");
     
    646657            // *** instruction
    647658
    648             fprintf(file, "Instruction pointer (where exception occured):\n    CS:EIP = %04X:%08X  ",
     659            fprintf(file, "Instruction pointer (where exception occured):\n    CS:EIP = %04lX:%08lX  ",
    649660                    pContextRec->ctx_SegCs,
    650661                    pContextRec->ctx_RegEip);
     
    653664            // *** CPU flags
    654665
    655             fprintf(file, "\n    FLG    = %08X", pContextRec->ctx_EFlags);
     666            fprintf(file, "\n    EFLAGS = %08lX", pContextRec->ctx_EFlags);
    656667
    657668            /*
     
    660671             */
    661672
    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);
    667679            excDescribePage(file, pContextRec->ctx_RegEsp);
    668680
    669             fprintf(file, "\n    EBP    =      %08X  ", pContextRec->ctx_RegEbp);
     681            fprintf(file, "\n    EBP    =      %08lX  ", pContextRec->ctx_RegEbp);
    670682            excDescribePage(file, pContextRec->ctx_RegEbp);
    671683
Note: See TracChangeset for help on using the changeset viewer.