Annotation of mstools/samples/sdktools/image/drwatson/include/drwatson.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1993  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     drwatson.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     Common header file for drwatson data structures.
                     12: 
                     13: Author:
                     14: 
                     15:     Wesley Witt (wesw) 1-May-1993
                     16: 
                     17: Environment:
                     18: 
                     19:     User Mode
                     20: 
                     21: --*/
                     22: 
                     23: typedef struct _RUNTIME_FUNCTION {
                     24:     ULONG BeginAddress;
                     25:     ULONG EndAddress;
                     26:     PVOID ExceptionHandler;
                     27:     PVOID HandlerData;
                     28:     ULONG PrologEndAddress;
                     29: } RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
                     30: 
                     31: typedef struct _tagOPTIONS {
                     32:     char                        szLogPath[MAX_PATH];
                     33:     char                        szWaveFile[MAX_PATH];
                     34:     BOOL                        fDumpSymbols;
                     35:     BOOL                        fDumpAllThreads;
                     36:     BOOL                        fAppendToLogFile;
                     37:     BOOL                        fVisual;
                     38:     BOOL                        fSound;
                     39:     DWORD                       dwInstructions;
                     40:     DWORD                       dwMaxCrashes;
                     41: } OPTIONS, *POPTIONS;
                     42: 
                     43: typedef struct _tagCRASHES {
                     44:     char                        szAppName[256];
                     45:     char                        szFunction[256];
                     46:     SYSTEMTIME                  time;
                     47:     DWORD                       dwExceptionCode;
                     48:     DWORD                       dwAddress;
                     49: } CRASHES, *PCRASHES;
                     50: 
                     51: typedef struct _tagCRASHINFO {
                     52:     HWND       hList;
                     53:     CRASHES    crash;
                     54:     HDC        hdc;
                     55:     DWORD      cxExtent;
                     56:     DWORD      dwIndex;
                     57:     DWORD      dwIndexDesired;
                     58:     char       *pCrashData;
                     59:     DWORD      dwCrashDataSize;
                     60: } CRASHINFO, *PCRASHINFO;
                     61: 
                     62: typedef struct _tagSYMBOL {
                     63:     struct _tagSYMBOL   *next;
                     64:     DWORD               addr;
                     65:     DWORD               size;
                     66:     unsigned char       szName[1];
                     67: } SYMBOL, *PSYMBOL;
                     68: 
                     69: typedef struct _tagMODULEINFO {
                     70:     struct _tagMODULEINFO     *next;          // pointer to next module
                     71:     DWORD                     dwBaseOfImage;  // based address
                     72:     DWORD                     dwLoadAddress;  // actual load address
                     73:     DWORD                     dwImageSize;    // size of image in bytes
                     74:     PFPO_DATA                 pFpoData;       // pointer to fpo data (x86)
                     75:     PRUNTIME_FUNCTION         pExceptionData; // pointer to pdata (risc)
                     76:     DWORD                     dwEntries;      // number of fpo or pdata recs
                     77:     PSYMBOL                   *symbolTable;   // pointer to symbol table
                     78:     DWORD                     numsyms;        // number of symbols in table
                     79:     char                      szName[1024];   // module name
                     80: } MODULEINFO, *PMODULEINFO;
                     81: 
                     82: typedef struct _tagSTACKWALK {
                     83:     DWORD               pc;
                     84:     DWORD               frame;
                     85:     long                ul;
                     86:     DWORD               params[4];
                     87:     PFPO_DATA           pFpoData;
                     88: } STACKWALK, *PSTACKWALK;
                     89: 
                     90: typedef struct _tagTHREADCONTEXT {
                     91:     struct _tagTHREADCONTEXT     *next;
                     92:     HANDLE                       hThread;
                     93:     DWORD                        dwThreadId;
                     94:     DWORD                        pc;
                     95:     DWORD                        frame;
                     96:     DWORD                        stack;
                     97:     CONTEXT                      context;
                     98:     PMODULEINFO                  mi;                   // valid to be NULL
                     99:     DWORD                        stackBase;
                    100:     DWORD                        stackRA;
                    101:     BOOL                         fFaultingContext;
                    102: } THREADCONTEXT, *PTHREADCONTEXT;
                    103: 
                    104: typedef struct _tagDEBUGPACKET {
                    105:     HWND                hwnd;
                    106:     HANDLE              hEvent;
                    107:     OPTIONS             options;
                    108:     DWORD               dwPidToDebug;
                    109:     HANDLE              hEventToSignal;
                    110:     HANDLE              hProcess;
                    111:     DWORD               dwProcessId;
                    112:     PMODULEINFO         miHead;
                    113:     PMODULEINFO         miTail;
                    114:     PTHREADCONTEXT      tctxHead;
                    115:     PTHREADCONTEXT      tctxTail;
                    116:     PTHREADCONTEXT      tctx;
                    117:     DWORD               stackBase;
                    118:     DWORD               stackRA;
                    119: } DEBUGPACKET, *PDEBUGPACKET;
                    120: 
                    121: typedef BOOL (CALLBACK* CRASHESENUMPROC)(PCRASHINFO);
                    122: 
                    123: #if DBG
                    124: #define Assert(exp)    if(!(exp)) {AssertError(#exp,__FILE__,__LINE__);}
                    125: #else
                    126: #define Assert(exp)
                    127: #endif
                    128: 
                    129: #define WM_DUMPCOMPLETE       WM_USER+500
                    130: #define WM_EXCEPTIONINFO      WM_USER+501
                    131: #define WM_ATTACHCOMPLETE     WM_USER+502

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.