Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

rtldump.c

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 00005 Module Name: 00006 00007 rtldump.c 00008 00009 Abstract: 00010 00011 This module implements dump procedures for: 00012 00013 ContextRecords, 00014 ExceptionReportRecords, 00015 ExceptionRegistrationRecords 00016 00017 Author: 00018 00019 Bryan Willman (bryanwi) 12 April 90 00020 00021 Environment: 00022 00023 Callable in any mode in which DbgPrint works. 00024 00025 Revision History: 00026 00027 --*/ 00028 00029 #include "ntrtlp.h" 00030 00031 VOID 00032 RtlpContextDump( 00033 IN PVOID Object, 00034 IN ULONG Control OPTIONAL 00035 ) 00036 /*++ 00037 00038 Routine Description: 00039 00040 This function dumps the contents of a context record. 00041 00042 Currently, it does not dump floating point context. 00043 00044 Arguments: 00045 00046 Object - Address of the record to dump. 00047 00048 Control - Ignored, here so we look like a standard dump procedure. 00049 00050 Return Value: 00051 00052 none 00053 00054 --*/ 00055 00056 { 00057 PCONTEXT Context; 00058 00059 Context = (PCONTEXT)Object; 00060 00061 DbgPrint(" Record @ %lx\n", (ULONG)Context); 00062 DbgPrint(" ContextFlags: %lx\n", Context->ContextFlags); 00063 DbgPrint("\n"); 00064 00065 DbgPrint(" SegGs: %lx\n", Context->SegGs); 00066 DbgPrint(" SegFs: %lx\n", Context->SegFs); 00067 DbgPrint(" SegEs: %lx\n", Context->SegEs); 00068 DbgPrint(" SegDs: %lx\n", Context->SegDs); 00069 DbgPrint("\n"); 00070 00071 DbgPrint(" Edi: %lx\n", Context->Edi); 00072 DbgPrint(" Esi: %lx\n", Context->Esi); 00073 DbgPrint(" Ebx: %lx\n", Context->Ebx); 00074 DbgPrint(" Edx: %lx\n", Context->Edx); 00075 DbgPrint(" Ecx: %lx\n", Context->Ecx); 00076 DbgPrint(" Eax: %lx\n", Context->Eax); 00077 DbgPrint("\n"); 00078 00079 DbgPrint(" Ebp: %lx\n", Context->Ebp); 00080 DbgPrint(" Eip: %lx\n", Context->Eip); 00081 DbgPrint(" SegCs: %lx\n", Context->SegCs); 00082 DbgPrint(" EFlags: %lx\n", Context->EFlags); 00083 DbgPrint(" Esp: %lx\n", Context->Esp); 00084 DbgPrint(" SegSs: %lx\n", Context->SegSs); 00085 DbgPrint("\n"); 00086 00087 return; 00088 } 00089 00090 00091 00092 VOID 00093 RtlpExceptionReportDump( 00094 IN PVOID Object, 00095 IN ULONG Control OPTIONAL 00096 ) 00097 /*++ 00098 00099 Routine Description: 00100 00101 This function dumps the contents of an Exception report record. 00102 00103 Arguments: 00104 00105 Object - Address of the record to dump. 00106 00107 Control - Ignored, here so we look like a standard dump procedure. 00108 00109 Return Value: 00110 00111 none 00112 00113 --*/ 00114 00115 { 00116 ULONG i; 00117 00118 PEXCEPTION_RECORD Exception; 00119 00120 Exception = (PEXCEPTION_RECORD)Object; 00121 00122 DbgPrint(" Record @ %lx\n", (ULONG)Exception); 00123 DbgPrint(" ExceptionCode: %lx\n", Exception->ExceptionCode); 00124 DbgPrint(" ExceptionFlags: %lx\n", Exception->ExceptionFlags); 00125 DbgPrint(" ExceptionRecord: %lx\n", Exception->ExceptionRecord); 00126 DbgPrint(" ExceptionAddress: %lx\n", Exception->ExceptionAddress); 00127 DbgPrint(" NumberParameters: %lx\n", Exception->NumberParameters); 00128 for (i = 0; i < Exception->NumberParameters; i++) 00129 DbgPrint("ExceptionInformation[%d]: %lx\n", 00130 i, Exception->ExceptionInformation[i]); 00131 DbgPrint("\n"); 00132 return; 00133 } 00134 00135 00136 00137 VOID 00138 RtlpExceptionRegistrationDump( 00139 IN PVOID Object, 00140 IN ULONG Control OPTIONAL 00141 ) 00142 /*++ 00143 00144 Routine Description: 00145 00146 This function dumps the contents of an exception registration record, 00147 unless Object == NULL, in which case it dumps the entire registration 00148 chain. 00149 00150 Currently, it does not dump floating point context. 00151 00152 Arguments: 00153 00154 Object - Address of the record to dump. 00155 00156 Control - Ignored, here so we look like a standard dump procedure. 00157 00158 Return Value: 00159 00160 none 00161 00162 --*/ 00163 00164 { 00165 PEXCEPTION_REGISTRATION_RECORD RegistrationPointer; 00166 00167 RegistrationPointer = (PEXCEPTION_REGISTRATION_RECORD)Object; 00168 00169 if (RegistrationPointer != EXCEPTION_CHAIN_END) { 00170 DbgPrint("Record @ %lx\n", (ULONG)RegistrationPointer); 00171 DbgPrint(" Next: %lx\n", RegistrationPointer->Next); 00172 DbgPrint("Handler: %lx\n", RegistrationPointer->Handler); 00173 DbgPrint("\n"); 00174 } else { 00175 RegistrationPointer = RtlpGetRegistrationHead(); 00176 00177 while (RegistrationPointer != EXCEPTION_CHAIN_END) { 00178 DbgPrint("Record @ %lx\n", (ULONG)RegistrationPointer); 00179 DbgPrint(" Next: %lx\n", RegistrationPointer->Next); 00180 DbgPrint("Handler: %lx\n", RegistrationPointer->Handler); 00181 DbgPrint("\n"); 00182 } 00183 } 00184 return; 00185 }

Generated on Sat May 15 19:41:40 2004 for test by doxygen 1.3.7