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

kdp.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 00005 Module Name: 00006 00007 kdp.h 00008 00009 Abstract: 00010 00011 Private include file for the Kernel Debugger subcomponent 00012 of the NTOS project 00013 00014 Author: 00015 00016 Mike O'Leary (mikeol) 29-June-1989 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 #include "ntos.h" 00023 #include "ki.h" 00024 #define NOEXTAPI 00025 #include "wdbgexts.h" 00026 #include "ntdbg.h" 00027 #include "string.h" 00028 #include "stdlib.h" 00029 00030 00031 #if defined(_ALPHA_) 00032 00033 #include "alphaops.h" 00034 00035 // 00036 // Define KD private PCR routines. 00037 // 00038 // Using the following private KD routines allows the kernel debugger to 00039 // step over breakpoints in modules that call the standard PCR routines. 00040 // 00041 00042 PKPCR KdpGetPcr(); 00043 00044 ULONG KdpReadInternalProcessorState(PVOID, ULONG); 00045 ULONG KdpReadInternalProcessorCounters(PVOID, ULONG); 00046 00047 struct _KPRCB * 00048 KdpGetCurrentPrcb(); 00049 00050 struct _KTHREAD * 00051 KdpGetCurrentThread(); 00052 00053 // 00054 // Redefine the standard PCR routines 00055 // 00056 #undef KiPcr 00057 #define KiPcr KdpGetPcr() 00058 00059 #undef KeGetPcr 00060 #undef KeGetCurrentPrcb 00061 #undef KeGetCurrentThread 00062 #undef KeIsExecutingDpc 00063 #define KeGetPcr() KdpGetPcr() 00064 #define KeGetCurrentPrcb() KdpGetCurrentPrcb() 00065 #define KeGetCurrentThread() KdpGetCurrentThread() 00066 00067 // 00068 // Define TYPES 00069 // 00070 00071 #define KDP_BREAKPOINT_TYPE ULONG 00072 00073 // longword aligned 00074 #define KDP_BREAKPOINT_ALIGN 3 00075 00076 // actual instruction is "call_pal kbpt" 00077 #define KDP_BREAKPOINT_VALUE KBPT_FUNC 00078 00079 00080 #elif defined(_IA64_) 00081 00082 // IA64 instruction is in a 128-bit bundle. Each bundle consists of 3 instruction slots. 00083 // Each instruction slot is 41-bit long. 00084 // 00085 // 00086 // 127 87 86 46 45 5 4 1 0 00087 // ------------------------------------------------------------ 00088 // | slot 2 | slot 1 | slot 0 |template|S| 00089 // ------------------------------------------------------------ 00090 // 00091 // 127 96 95 64 63 32 31 0 00092 // ------------------------------------------------------------ 00093 // | byte 3 | byte 2 | byte 1 | byte 0 | 00094 // ------------------------------------------------------------ 00095 // 00096 // This presents two incompatibilities with conventional processors: 00097 // 1. The IA64 IP address is at the bundle bundary. The instruction slot number is 00098 // stored in ISR.ei at the time of exception. 00099 // 2. The 41-bit instruction format is not byte-aligned. 00100 // 00101 // Break instruction insertion must be done with proper bit-shifting to align with the selected 00102 // instruction slot. Further, to insert break instruction insertion at a specific slot, we must 00103 // be able to specify instruction slot as part of the address. We therefore define an EM address as 00104 // bundle address + slot number with the least significant two bit always zero: 00105 // 00106 // 31 4 3 2 1 0 00107 // -------------------------------- 00108 // | bundle address |slot#|0 0| 00109 // -------------------------------- 00110 // 00111 // The EM address as defined is the byte-aligned address that is closest to the actual instruction slot. 00112 // i.e., The EM instruction address of slot #0 is equal to bundle address. 00113 // slot #1 is equal to bundle address + 4. 00114 // slot #2 is equal to bundle address + 8. 00115 00116 // 00117 // Upon exception, the bundle address is kept in IIP, and the instruction slot which caused 00118 // the exception is in ISR.ei. Kernel exception handler will construct the flat address and 00119 // export it in ExceptionRecord.ExceptionAddress. 00120 00121 00122 #define KDP_BREAKPOINT_TYPE ULONGLONG // 64-bit ULONGLONG type is needed to cover 41-bit EM break instruction. 00123 #define KDP_BREAKPOINT_ALIGN 0x3 // An EM address consists of bundle and slot number and is 32-bit aligned. 00124 #define KDP_BREAKPOINT_VALUE (BREAK_INSTR | (DEBUG_STOP_BREAKPOINT << 6)) 00125 00126 #elif defined(_X86_) 00127 00128 #define KDP_BREAKPOINT_TYPE UCHAR 00129 #define KDP_BREAKPOINT_ALIGN 0 00130 #define KDP_BREAKPOINT_VALUE 0xcc 00131 00132 #endif 00133 00134 00135 00136 // 00137 // Define constants. 00138 // 00139 00140 // 00141 // Addresses above GLOBAL_BREAKPOINT_LIMIT are either in system space 00142 // or part of dynlink, so we treat them as global. 00143 // 00144 00145 #define GLOBAL_BREAKPOINT_LIMIT 1610612736L // 1.5gigabytes 00146 00147 // 00148 // Define breakpoint table entry structure. 00149 // 00150 00151 #define KD_BREAKPOINT_IN_USE 0x00000001 00152 #define KD_BREAKPOINT_NEEDS_WRITE 0x00000002 00153 #define KD_BREAKPOINT_SUSPENDED 0x00000004 00154 #define KD_BREAKPOINT_NEEDS_REPLACE 0x00000008 00155 // IA64 specific defines 00156 #define KD_BREAKPOINT_STATE_MASK 0x0000000f 00157 #define KD_BREAKPOINT_IA64_MASK 0x000f0000 00158 #define KD_BREAKPOINT_IA64_MODE 0x00010000 // IA64 mode 00159 #define KD_BREAKPOINT_IA64_MOVL 0x00020000 // MOVL instruction displaced 00160 00161 // 00162 // status Constants for Packet waiting 00163 // 00164 00165 #define KDP_PACKET_RECEIVED 0 00166 #define KDP_PACKET_TIMEOUT 1 00167 #define KDP_PACKET_RESEND 2 00168 00169 00170 typedef struct _BREAKPOINT_ENTRY { 00171 ULONG Flags; 00172 ULONG_PTR DirectoryTableBase; 00173 PVOID Address; 00174 KDP_BREAKPOINT_TYPE Content; 00175 } BREAKPOINT_ENTRY, *PBREAKPOINT_ENTRY; 00176 00177 00178 // 00179 // Misc defines 00180 // 00181 00182 #define MAXIMUM_RETRIES 20 00183 00184 #define DBGKD_MAX_SPECIAL_CALLS 10 00185 00186 typedef struct _TRACE_DATA_SYM { 00187 ULONG SymMin; 00188 ULONG SymMax; 00189 } TRACE_DATA_SYM, *PTRACE_DATA_SYM; 00190 00191 // 00192 // Define function prototypes. 00193 // 00194 00195 VOID 00196 KdpReboot ( 00197 VOID 00198 ); 00199 00200 BOOLEAN 00201 KdpPrintString ( 00202 IN PSTRING Output 00203 ); 00204 00205 BOOLEAN 00206 KdpPromptString ( 00207 IN PSTRING Output, 00208 IN OUT PSTRING Input 00209 ); 00210 00211 ULONG 00212 KdpAddBreakpoint ( 00213 IN PVOID Address 00214 ); 00215 00216 BOOLEAN 00217 KdpDeleteBreakpoint ( 00218 IN ULONG Handle 00219 ); 00220 00221 BOOLEAN 00222 KdpDeleteBreakpointRange ( 00223 IN PVOID Lower, 00224 IN PVOID Upper 00225 ); 00226 00227 #if defined(_IA64_) 00228 00229 BOOLEAN 00230 KdpSuspendBreakpointRange ( 00231 IN PVOID Lower, 00232 IN PVOID Upper 00233 ); 00234 00235 BOOLEAN 00236 KdpRestoreBreakpointRange ( 00237 IN PVOID Lower, 00238 IN PVOID Upper 00239 ); 00240 #endif 00241 00242 #if i386 00243 00244 NTSTATUS 00245 KdGetTraceInformation ( 00246 OUT PVOID TraceInformation, 00247 IN ULONG TraceInformationLength, 00248 OUT PULONG RequiredLength 00249 ); 00250 00251 VOID 00252 KdSetInternalBreakpoint ( 00253 IN PDBGKD_MANIPULATE_STATE64 m 00254 ); 00255 00256 #endif 00257 00258 NTSTATUS 00259 KdQuerySpecialCalls ( 00260 IN PDBGKD_MANIPULATE_STATE64 m, 00261 IN ULONG Length, 00262 OUT PULONG RequiredLength 00263 ); 00264 00265 VOID 00266 KdSetSpecialCall ( 00267 IN PDBGKD_MANIPULATE_STATE64 m, 00268 IN PCONTEXT ContextRecord 00269 ); 00270 00271 VOID 00272 KdClearSpecialCalls ( 00273 VOID 00274 ); 00275 00276 ULONG 00277 KdpMoveMemory ( 00278 IN PCHAR Destination, 00279 IN PCHAR Source, 00280 IN ULONG Length 00281 ); 00282 00283 VOID 00284 KdpQuickMoveMemory ( 00285 IN PCHAR Destination, 00286 IN PCHAR Source, 00287 IN ULONG Length 00288 ); 00289 00290 ULONG 00291 KdpReceivePacket ( 00292 IN ULONG ExpectedPacketType, 00293 OUT PSTRING MessageHeader, 00294 OUT PSTRING MessageData, 00295 OUT PULONG DataLength 00296 ); 00297 00298 VOID 00299 KdpSetLoadState( 00300 IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, 00301 IN PCONTEXT ContextRecord 00302 ); 00303 00304 VOID 00305 KdpSetStateChange( 00306 IN PDBGKD_WAIT_STATE_CHANGE64 WaitStateChange, 00307 IN PEXCEPTION_RECORD ExceptionRecord, 00308 IN PCONTEXT ContextRecord, 00309 IN BOOLEAN SecondChance 00310 ); 00311 00312 VOID 00313 KdpGetStateChange( 00314 IN PDBGKD_MANIPULATE_STATE64 ManipulateState, 00315 IN PCONTEXT ContextRecord 00316 ); 00317 00318 VOID 00319 KdpSendPacket ( 00320 IN ULONG PacketType, 00321 IN PSTRING MessageHeader, 00322 IN PSTRING MessageData OPTIONAL 00323 ); 00324 00325 BOOLEAN 00326 KdpStub ( 00327 IN PKTRAP_FRAME TrapFrame, 00328 IN PKEXCEPTION_FRAME ExceptionFrame, 00329 IN PEXCEPTION_RECORD ExceptionRecord, 00330 IN PCONTEXT ContextRecord, 00331 IN KPROCESSOR_MODE PreviousMode, 00332 IN BOOLEAN SecondChance 00333 ); 00334 00335 BOOLEAN 00336 KdpTrap ( 00337 IN PKTRAP_FRAME TrapFrame, 00338 IN PKEXCEPTION_FRAME ExceptionFrame, 00339 IN PEXCEPTION_RECORD ExceptionRecord64, 00340 IN PCONTEXT ContextRecord, 00341 IN KPROCESSOR_MODE PreviousMode, 00342 IN BOOLEAN SecondChance 00343 ); 00344 00345 BOOLEAN 00346 KdpSwitchProcessor ( 00347 IN PEXCEPTION_RECORD ExceptionRecord, 00348 IN OUT PCONTEXT ContextRecord, 00349 IN BOOLEAN SecondChance 00350 ); 00351 00352 BOOLEAN 00353 KdpReportExceptionStateChange ( 00354 IN PEXCEPTION_RECORD ExceptionRecord, 00355 IN OUT PCONTEXT ContextRecord, 00356 IN BOOLEAN SecondChance 00357 ); 00358 00359 BOOLEAN 00360 KdpReportLoadSymbolsStateChange ( 00361 IN PSTRING PathName, 00362 IN PKD_SYMBOLS_INFO SymbolInfo, 00363 IN BOOLEAN UnloadSymbols, 00364 IN OUT PCONTEXT ContextRecord 00365 ); 00366 00367 KCONTINUE_STATUS 00368 KdpSendWaitContinue( 00369 IN ULONG PacketType, 00370 IN PSTRING MessageHeader, 00371 IN PSTRING MessageData OPTIONAL, 00372 IN OUT PCONTEXT ContextRecord 00373 ); 00374 00375 VOID 00376 KdpReadVirtualMemory( 00377 IN PDBGKD_MANIPULATE_STATE64 m, 00378 IN PSTRING AdditionalData, 00379 IN PCONTEXT Context 00380 ); 00381 00382 #if 0 00383 VOID 00384 KdpReadVirtualMemory64( 00385 IN PDBGKD_MANIPULATE_STATE64 m, 00386 IN PSTRING AdditionalData, 00387 IN PCONTEXT Context 00388 ); 00389 #endif 00390 00391 VOID 00392 KdpWriteVirtualMemory( 00393 IN PDBGKD_MANIPULATE_STATE64 m, 00394 IN PSTRING AdditionalData, 00395 IN PCONTEXT Context 00396 ); 00397 00398 #if 0 00399 VOID 00400 KdpWriteVirtualMemory64( 00401 IN PDBGKD_MANIPULATE_STATE64 m, 00402 IN PSTRING AdditionalData, 00403 IN PCONTEXT Context 00404 ); 00405 #endif 00406 00407 VOID 00408 KdpReadPhysicalMemory( 00409 IN PDBGKD_MANIPULATE_STATE64 m, 00410 IN PSTRING AdditionalData, 00411 IN PCONTEXT Context 00412 ); 00413 00414 VOID 00415 KdpWritePhysicalMemory( 00416 IN PDBGKD_MANIPULATE_STATE64 m, 00417 IN PSTRING AdditionalData, 00418 IN PCONTEXT Context 00419 ); 00420 00421 VOID 00422 KdpCheckLowMemory( 00423 IN PDBGKD_MANIPULATE_STATE64 m 00424 ); 00425 00426 VOID 00427 KdpGetContext( 00428 IN PDBGKD_MANIPULATE_STATE64 m, 00429 IN PSTRING AdditionalData, 00430 IN PCONTEXT Context 00431 ); 00432 00433 VOID 00434 KdpSetContext( 00435 IN PDBGKD_MANIPULATE_STATE64 m, 00436 IN PSTRING AdditionalData, 00437 IN PCONTEXT Context 00438 ); 00439 00440 VOID 00441 KdpWriteBreakpoint( 00442 IN PDBGKD_MANIPULATE_STATE64 m, 00443 IN PSTRING AdditionalData, 00444 IN PCONTEXT Context 00445 ); 00446 00447 VOID 00448 KdpRestoreBreakpoint( 00449 IN PDBGKD_MANIPULATE_STATE64 m, 00450 IN PSTRING AdditionalData, 00451 IN PCONTEXT Context 00452 ); 00453 00454 VOID 00455 KdpReadControlSpace( 00456 IN PDBGKD_MANIPULATE_STATE64 m, 00457 IN PSTRING AdditionalData, 00458 IN PCONTEXT Context 00459 ); 00460 00461 VOID 00462 KdpWriteControlSpace( 00463 IN PDBGKD_MANIPULATE_STATE64 m, 00464 IN PSTRING AdditionalData, 00465 IN PCONTEXT Context 00466 ); 00467 00468 VOID 00469 KdpReadIoSpace( 00470 IN PDBGKD_MANIPULATE_STATE64 m, 00471 IN PSTRING AdditionalData, 00472 IN PCONTEXT Context 00473 ); 00474 00475 VOID 00476 KdpReadMachineSpecificRegister( 00477 IN PDBGKD_MANIPULATE_STATE64 m, 00478 IN PSTRING AdditionalData, 00479 IN PCONTEXT Context 00480 ); 00481 00482 VOID 00483 KdpWriteIoSpace( 00484 IN PDBGKD_MANIPULATE_STATE64 m, 00485 IN PSTRING AdditionalData, 00486 IN PCONTEXT Context 00487 ); 00488 00489 VOID 00490 KdpWriteMachineSpecificRegister( 00491 IN PDBGKD_MANIPULATE_STATE64 m, 00492 IN PSTRING AdditionalData, 00493 IN PCONTEXT Context 00494 ); 00495 00496 #ifdef _ALPHA_ 00497 00498 VOID 00499 KdpReadIoSpaceExtended ( 00500 IN PDBGKD_MANIPULATE_STATE64 m, 00501 IN PSTRING AdditionalData, 00502 IN PCONTEXT Context 00503 ); 00504 00505 VOID 00506 KdpWriteIoSpaceExtended ( 00507 IN PDBGKD_MANIPULATE_STATE64 m, 00508 IN PSTRING AdditionalData, 00509 IN PCONTEXT Context 00510 ); 00511 00512 VOID 00513 KdpGetBusData ( 00514 IN PDBGKD_MANIPULATE_STATE64 m, 00515 IN PSTRING AdditionalData, 00516 IN PCONTEXT Context 00517 ); 00518 00519 VOID 00520 KdpSetBusData ( 00521 IN PDBGKD_MANIPULATE_STATE64 m, 00522 IN PSTRING AdditionalData, 00523 IN PCONTEXT Context 00524 ); 00525 00526 #endif 00527 00528 00529 VOID 00530 KdpSuspendBreakpoint ( 00531 ULONG Handle 00532 ); 00533 00534 VOID 00535 KdpSuspendAllBreakpoints ( 00536 VOID 00537 ); 00538 00539 VOID 00540 KdpRestoreAllBreakpoints ( 00541 VOID 00542 ); 00543 00544 VOID 00545 KdpTimeSlipDpcRoutine ( 00546 PKDPC Dpc, 00547 PVOID DeferredContext, 00548 PVOID SystemArgument1, 00549 PVOID SystemArgument2 00550 ); 00551 00552 VOID 00553 KdpTimeSlipWork ( 00554 IN PVOID Context 00555 ); 00556 00557 // 00558 // Define dummy prototype so the address of the standard breakpoint instruction 00559 // can be captured. 00560 // 00561 // N.B. This function is NEVER called. 00562 // 00563 00564 VOID 00565 RtlpBreakWithStatusInstruction ( 00566 VOID 00567 ); 00568 00569 // 00570 // Define external references. 00571 // 00572 00573 #define KDP_MESSAGE_BUFFER_SIZE 4096 00574 00575 extern BREAKPOINT_ENTRY KdpBreakpointTable[BREAKPOINT_TABLE_SIZE]; 00576 extern BOOLEAN KdpControlCPending; 00577 extern KSPIN_LOCK KdpDebuggerLock; 00578 extern PKDEBUG_ROUTINE KiDebugRoutine; 00579 extern PKDEBUG_SWITCH_ROUTINE KiDebugSwitchRoutine; 00580 extern KDP_BREAKPOINT_TYPE KdpBreakpointInstruction; 00581 extern UCHAR KdpMessageBuffer[KDP_MESSAGE_BUFFER_SIZE]; 00582 extern UCHAR KdpPathBuffer[KDP_MESSAGE_BUFFER_SIZE]; 00583 extern ULONG KdpOweBreakpoint; 00584 extern ULONG KdpNextPacketIdToSend; 00585 extern ULONG KdpPacketIdExpected; 00586 00587 extern LARGE_INTEGER KdPerformanceCounterRate; 00588 extern LARGE_INTEGER KdTimerStart; 00589 extern LARGE_INTEGER KdTimerStop; 00590 extern LARGE_INTEGER KdTimerDifference; 00591 00592 extern BOOLEAN BreakpointsSuspended; 00593 extern PVOID KdpNtosImageBase; 00594 extern LIST_ENTRY KdpDebuggerDataListHead; 00595 00596 typedef struct { 00597 ULONG64 Addr; // pc address of breakpoint 00598 ULONG Flags; // Flags bits 00599 ULONG Calls; // # of times traced routine called 00600 ULONG CallsLastCheck; // # of calls at last periodic (1s) check 00601 ULONG MaxCallsPerPeriod; 00602 ULONG MinInstructions; // largest number of instructions for 1 call 00603 ULONG MaxInstructions; // smallest # of instructions for 1 call 00604 ULONG TotalInstructions; // total instructions for all calls 00605 ULONG Handle; // handle in (regular) bpt table 00606 PVOID Thread; // Thread that's skipping this BP 00607 ULONG64 ReturnAddress; // return address (if not COUNTONLY) 00608 } DBGKD_INTERNAL_BREAKPOINT, *PDBGKD_INTERNAL_BREAKPOINT; 00609 00610 00611 #define DBGKD_MAX_INTERNAL_BREAKPOINTS 20 00612 extern DBGKD_INTERNAL_BREAKPOINT KdpInternalBPs[DBGKD_MAX_INTERNAL_BREAKPOINTS]; 00613 00614 extern ULONG_PTR KdpCurrentSymbolStart; 00615 extern ULONG_PTR KdpCurrentSymbolEnd; 00616 extern LONG KdpNextCallLevelChange; 00617 extern ULONG_PTR KdSpecialCalls[]; 00618 extern ULONG KdNumberOfSpecialCalls; 00619 extern ULONG_PTR InitialSP; 00620 extern ULONG KdpNumInternalBreakpoints; 00621 extern KTIMER InternalBreakpointTimer; 00622 extern KDPC InternalBreakpointCheckDpc; 00623 extern BOOLEAN KdpPortLocked; 00624 extern LARGE_INTEGER KdpTimeEntered; 00625 00626 extern DBGKD_TRACE_DATA TraceDataBuffer[]; 00627 extern ULONG TraceDataBufferPosition; 00628 extern TRACE_DATA_SYM TraceDataSyms[]; 00629 extern UCHAR NextTraceDataSym; 00630 extern UCHAR NumTraceDataSyms; 00631 extern ULONG IntBPsSkipping; 00632 extern BOOLEAN WatchStepOver; 00633 extern PVOID WSOThread; 00634 extern ULONG_PTR WSOEsp; 00635 extern ULONG WatchStepOverHandle; 00636 extern ULONG_PTR WatchStepOverBreakAddr; 00637 extern BOOLEAN WatchStepOverSuspended; 00638 extern ULONG InstructionsTraced; 00639 extern BOOLEAN SymbolRecorded; 00640 extern LONG CallLevelChange; 00641 extern LONG_PTR oldpc; 00642 extern BOOLEAN InstrCountInternal; 00643 extern BOOLEAN BreakpointsSuspended; 00644 extern BOOLEAN KdpControlCPending; 00645 extern BOOLEAN KdpControlCPressed; 00646 extern ULONG KdpRetryCount; 00647 extern ULONG KdpNumberRetries; 00648 extern ULONG KdpDefaultRetries; 00649 00650 extern KDP_BREAKPOINT_TYPE KdpBreakpointInstruction; 00651 extern ULONG KdpOweBreakpoint; 00652 extern ULONG KdpNextPacketIdToSend; 00653 extern ULONG KdpPacketIdExpected; 00654 extern PVOID KdpNtosImageBase; 00655 extern UCHAR KdPrintCircularBuffer[KDPRINTBUFFERSIZE]; 00656 extern PUCHAR KdPrintWritePointer; 00657 extern ULONG KdPrintRolloverCount; 00658 extern KSPIN_LOCK KdpPrintSpinLock; 00659 extern DEBUG_PARAMETERS KdDebugParameters; 00660 extern KSPIN_LOCK KdpDataSpinLock; 00661 extern LIST_ENTRY KdpDebuggerDataListHead; 00662 extern KDDEBUGGER_DATA64 KdDebuggerDataBlock; 00663 extern KDPC KdpTimeSlipDpc; 00664 extern WORK_QUEUE_ITEM KdpTimeSlipWorkItem; 00665 extern KTIMER KdpTimeSlipTimer; 00666 extern ULONG KdpTimeSlipPending; 00667 extern KSPIN_LOCK KdpTimeSlipEventLock; 00668 extern PVOID KdpTimeSlipEvent; 00669 extern BOOLEAN KdpDebuggerStructuresInitialized; 00670 extern ULONG KdEnteredDebugger; 00671 00672 // 00673 // !search support (page hit database) 00674 // 00675 00676 // 00677 // Hit database where search results are stored (kddata.c). 00678 // The debugger extensions know how to extract the information 00679 // from here. 00680 // 00681 // Note that the size of the hit database is large enough to 00682 // accomodate any searches because the !search extension works 00683 // in batches of pages < PAGE_SIZE and for every page we register only 00684 // one hit. 00685 // 00686 00687 #define SEARCH_PAGE_HIT_DATABASE_SIZE PAGE_SIZE 00688 00689 extern PFN_NUMBER KdpSearchPageHits[SEARCH_PAGE_HIT_DATABASE_SIZE]; 00690 extern ULONG KdpSearchPageHitOffsets[SEARCH_PAGE_HIT_DATABASE_SIZE]; 00691 00692 extern ULONG KdpSearchPageHitIndex; 00693 00694 // 00695 // Set to true while a physical memory search is in progress. 00696 // Reset at the end of the search. This is done in the debugger 00697 // extension and it is a flag used by KdpCheckLowMemory to get 00698 // onto a different code path. 00699 // 00700 00701 extern LOGICAL KdpSearchInProgress; 00702 00703 // 00704 // These variables store the current state of the search operation. 00705 // They can be used to restore an interrupted search. 00706 // 00707 00708 extern PFN_NUMBER KdpSearchStartPageFrame; 00709 extern PFN_NUMBER KdpSearchEndPageFrame; 00710 00711 extern ULONG_PTR KdpSearchAddressRangeStart; 00712 extern ULONG_PTR KdpSearchAddressRangeEnd; 00713 00714 // 00715 // Checkpoint variable used to test if we have the right 00716 // debugging symbols. 00717 // 00718 00719 #define KDP_SEARCH_SYMBOL_CHECK 0xABCDDCBA 00720 00721 extern ULONG KdpSearchCheckPoint; 00722 00723 // 00724 // Page search flags 00725 // 00726 00727 #define KDP_SEARCH_ALL_OFFSETS_IN_PAGE 0x0001 00728 00729 00730 00731 // 00732 // Private procedure prototypes 00733 // 00734 00735 VOID 00736 KdpInitCom( 00737 VOID 00738 ); 00739 00740 VOID 00741 KdpPortLock( 00742 VOID 00743 ); 00744 00745 VOID 00746 KdpPortUnlock( 00747 VOID 00748 ); 00749 00750 BOOLEAN 00751 KdpPollBreakInWithPortLock( 00752 VOID 00753 ); 00754 00755 USHORT 00756 KdpReceivePacketLeader ( 00757 IN ULONG PacketType, 00758 OUT PULONG PacketLeader 00759 ); 00760 00761 #if DBG 00762 00763 #include <stdio.h> 00764 #define DPRINT(s) KdpDprintf s 00765 00766 VOID 00767 KdpDprintf( 00768 IN PCHAR f, 00769 ... 00770 ); 00771 00772 #else 00773 00774 #define DPRINT(s) 00775 00776 #endif 00777 00778

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