#include "ntos.h"#include "ki.h"#include "ntdbg.h"#include "string.h"#include "stdlib.h"#include "kdpcpu.h"Go to the source code of this file.
Classes | |
| struct | _BREAKPOINT_ENTRY |
| struct | _TRACE_DATA_SYM |
| struct | DBGKD_INTERNAL_BREAKPOINT |
Defines | |
| #define | GLOBAL_BREAKPOINT_LIMIT 1610612736L |
| #define | KD_BREAKPOINT_IN_USE 0x00000001 |
| #define | KD_BREAKPOINT_NEEDS_WRITE 0x00000002 |
| #define | KD_BREAKPOINT_SUSPENDED 0x00000004 |
| #define | KD_BREAKPOINT_NEEDS_REPLACE 0x00000008 |
| #define | KD_BREAKPOINT_STATE_MASK 0x0000000f |
| #define | KD_BREAKPOINT_IA64_MASK 0x000f0000 |
| #define | KD_BREAKPOINT_IA64_MODE 0x00010000 |
| #define | KD_BREAKPOINT_IA64_MOVL 0x00020000 |
| #define | KDP_PACKET_RECEIVED 0 |
| #define | KDP_PACKET_TIMEOUT 1 |
| #define | KDP_PACKET_RESEND 2 |
| #define | MAXIMUM_RETRIES 20 |
| #define | DBGKD_MAX_SPECIAL_CALLS 10 |
| #define | KDP_MESSAGE_BUFFER_SIZE 4096 |
| #define | DBGKD_MAX_INTERNAL_BREAKPOINTS 20 |
| #define | DPRINT(s) |
Typedefs | |
| typedef _BREAKPOINT_ENTRY | BREAKPOINT_ENTRY |
| typedef _BREAKPOINT_ENTRY * | PBREAKPOINT_ENTRY |
| typedef _TRACE_DATA_SYM | TRACE_DATA_SYM |
| typedef _TRACE_DATA_SYM * | PTRACE_DATA_SYM |
| typedef * | PDBGKD_INTERNAL_BREAKPOINT |
Functions | |
| VOID | KdpReboot (VOID) |
| BOOLEAN | KdpPrintString (IN PSTRING Output) |
| BOOLEAN | KdpPromptString (IN PSTRING Output, IN OUT PSTRING Input) |
| ULONG | KdpAddBreakpoint (IN PVOID Address) |
| BOOLEAN | KdpDeleteBreakpoint (IN ULONG Handle) |
| BOOLEAN | KdpDeleteBreakpointRange (IN PVOID Lower, IN PVOID Upper) |
| ULONG | KdpMoveMemory (IN PCHAR Destination, IN PCHAR Source, IN ULONG Length) |
| VOID | KdpQuickMoveMemory (IN PCHAR Destination, IN PCHAR Source, IN ULONG Length) |
| ULONG | KdpReceivePacket (IN ULONG ExpectedPacketType, OUT PSTRING MessageHeader, OUT PSTRING MessageData, OUT PULONG DataLength) |
| VOID | KdpSetLoadState (IN PDBGKD_WAIT_STATE_CHANGE WaitStateChange, IN PCONTEXT ContextRecord) |
| VOID | KdpSetStateChange (IN PDBGKD_WAIT_STATE_CHANGE WaitStateChange, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN BOOLEAN SecondChance) |
| VOID | KdpGetStateChange (IN PDBGKD_MANIPULATE_STATE ManipulateState, IN PCONTEXT ContextRecord) |
| VOID | KdpSendPacket (IN ULONG PacketType, IN PSTRING MessageHeader, IN PSTRING MessageData OPTIONAL) |
| BOOLEAN | KdpStub (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance) |
| BOOLEAN | KdpTrap (IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance) |
| VOID | KdpDisplayString (IN PCHAR Output) |
| VOID | KdpWriteComPacket (USHORT, USHORT, PVOID, PVOID, PVOID) |
| BOOLEAN | KdpReadComPacket (VOID) |
| BOOLEAN | KdpSwitchProcessor (IN PEXCEPTION_RECORD ExceptionRecord, IN OUT PCONTEXT ContextRecord, IN BOOLEAN SecondChance) |
| BOOLEAN | KdpReportExceptionStateChange (IN PEXCEPTION_RECORD ExceptionRecord, IN OUT PCONTEXT ContextRecord, IN BOOLEAN SecondChance) |
| BOOLEAN | KdpReportLoadSymbolsStateChange (IN PSTRING PathName, IN PKD_SYMBOLS_INFO SymbolInfo, IN BOOLEAN UnloadSymbols, IN OUT PCONTEXT ContextRecord) |
| KCONTINUE_STATUS | KdpSendWaitContinue (IN ULONG PacketType, IN PSTRING MessageHeader, IN PSTRING MessageData OPTIONAL, IN OUT PCONTEXT ContextRecord) |
| VOID | KdpReadVirtualMemory (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpReadVirtualMemory64 (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteVirtualMemory (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteVirtualMemory64 (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpReadPhysicalMemory (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWritePhysicalMemory (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpGetContext (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpSetContext (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteBreakpoint (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpRestoreBreakpoint (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpReadControlSpace (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteControlSpace (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpReadIoSpace (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpReadMachineSpecificRegister (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteIoSpace (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpWriteMachineSpecificRegister (IN PDBGKD_MANIPULATE_STATE m, IN PSTRING AdditionalData, IN PCONTEXT Context) |
| VOID | KdpSuspendBreakpoint (ULONG Handle) |
| VOID | KdpSuspendAllBreakpoints (VOID) |
| VOID | KdpRestoreAllBreakpoints (VOID) |
| VOID | KdpTimeSlipDpcRoutine (PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2) |
| VOID | KdpTimeSlipWork (IN PVOID Context) |
| VOID | RtlpBreakWithStatusInstruction (VOID) |
| VOID | KdpInitCom (VOID) |
| VOID | KdpPortLock (VOID) |
| VOID | KdpPortUnlock (VOID) |
| BOOLEAN | KdpPollBreakInWithPortLock (VOID) |
| USHORT | KdpReceivePacketLeader (IN ULONG PacketType, OUT PULONG PacketLeader) |
Variables | |
| BREAKPOINT_ENTRY | KdpBreakpointTable [BREAKPOINT_TABLE_SIZE] |
| BOOLEAN | KdpControlCPending |
| KSPIN_LOCK | KdpDebuggerLock |
| PKDEBUG_ROUTINE | KiDebugRoutine |
| PKDEBUG_SWITCH_ROUTINE | KiDebugSwitchRoutine |
| KDP_BREAKPOINT_TYPE | KdpBreakpointInstruction |
| UCHAR | KdpMessageBuffer [KDP_MESSAGE_BUFFER_SIZE] |
| UCHAR | KdpPathBuffer [KDP_MESSAGE_BUFFER_SIZE] |
| ULONG | KdpOweBreakpoint |
| ULONG | KdpNextPacketIdToSend |
| ULONG | KdpPacketIdExpected |
| LARGE_INTEGER | KdPerformanceCounterRate |
| LARGE_INTEGER | KdTimerStart |
| LARGE_INTEGER | KdTimerStop |
| LARGE_INTEGER | KdTimerDifference |
| BOOLEAN | BreakpointsSuspended |
| PVOID | KdpNtosImageBase |
| LIST_ENTRY | KdpDebuggerDataListHead |
| DBGKD_INTERNAL_BREAKPOINT | KdpInternalBPs [DBGKD_MAX_INTERNAL_BREAKPOINTS] |
| ULONG_PTR | KdpCurrentSymbolStart |
| ULONG_PTR | KdpCurrentSymbolEnd |
| LONG | KdpNextCallLevelChange |
| ULONG_PTR | KdSpecialCalls [] |
| ULONG | KdNumberOfSpecialCalls |
| ULONG_PTR | InitialSP |
| ULONG | KdpNumInternalBreakpoints |
| KTIMER | InternalBreakpointTimer |
| KDPC | InternalBreakpointCheckDpc |
| BOOLEAN | KdpPortLocked |
| LARGE_INTEGER | KdpTimeEntered |
| DBGKD_TRACE_DATA | TraceDataBuffer [] |
| ULONG | TraceDataBufferPosition |
| TRACE_DATA_SYM | TraceDataSyms [] |
| UCHAR | NextTraceDataSym |
| UCHAR | NumTraceDataSyms |
| ULONG | IntBPsSkipping |
| BOOLEAN | WatchStepOver |
| PVOID | WSOThread |
| ULONG | WSOEsp |
| ULONG | WatchStepOverHandle |
| ULONG_PTR | WatchStepOverBreakAddr |
| BOOLEAN | WatchStepOverSuspended |
| ULONG | InstructionsTraced |
| BOOLEAN | SymbolRecorded |
| LONG | CallLevelChange |
| LONG | oldpc |
| BOOLEAN | InstrCountInternal |
| BOOLEAN | KdpControlCPressed |
| ULONG | KdpRetryCount |
| ULONG | KdpNumberRetries |
| UCHAR | KdPrintCircularBuffer [KDPRINTBUFFERSIZE] |
| PUCHAR | KdPrintWritePointer |
| ULONG | KdPrintRolloverCount |
| KSPIN_LOCK | KdpPrintSpinLock |
| DEBUG_PARAMETERS | KdDebugParameters |
| KSPIN_LOCK | KdpDataSpinLock |
| KDDEBUGGER_DATA | KdDebuggerDataBlock |
| KDPC | KdpTimeSlipDpc |
| WORK_QUEUE_ITEM | KdpTimeSlipWorkItem |
| KTIMER | KdpTimeSlipTimer |
| ULONG | KdpTimeSlipPending |
| KSPIN_LOCK | KdpTimeSlipEventLock |
| PVOID | KdpTimeSlipEvent |
| BOOLEAN | KdpDebuggerStructuresInitialized |
| ULONG | KdEnteredDebugger |
|
|
|
|
|
|
|
|
Definition at line 573 of file kdp.h. Referenced by KdEnterDebugger(), KdpAddBreakpoint(), KdpDeleteBreakpoint(), KdpLowRestoreBreakpoint(), KdpLowWriteContent(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 42 of file kdp.h. Referenced by KdpAddBreakpoint(), and KdSetOwedBreakpoints(). |
|
|
|
|
|
|
|
|
Definition at line 56 of file kdp.h. Referenced by KdpAddBreakpoint(), KdpLowRestoreBreakpoint(), KdpLowWriteContent(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 48 of file kdp.h. Referenced by KdpAddBreakpoint(), KdpDeleteBreakpointRange(), KdpRestoreAllBreakpoints(), KdpSuspendBreakpoint(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 51 of file kdp.h. Referenced by KdpAddBreakpoint(), KdpDeleteBreakpoint(), KdpLowRestoreBreakpoint(), KdpLowWriteContent(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 49 of file kdp.h. Referenced by KdpAddBreakpoint(), KdpLowRestoreBreakpoint(), KdpLowWriteContent(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 53 of file kdp.h. Referenced by KdpAddBreakpoint(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 50 of file kdp.h. Referenced by KdpDeleteBreakpoint(), KdpRestoreAllBreakpoints(), KdpSuspendBreakpoint(), and KdSetOwedBreakpoints(). |
|
|
Definition at line 432 of file kdp.h. Referenced by KdpMoveMemory(), KdpPromptString(), KdpReadControlSpace(), and KdpSendWaitContinue(). |
|
|
Definition at line 62 of file kdp.h. Referenced by KdpPromptString(), KdpReceivePacket(), KdpReceivePacketLeader(), and KdpSendPacket(). |
|
|
Definition at line 64 of file kdp.h. Referenced by KdpPromptString(), KdpReceivePacket(), KdpReceivePacketLeader(), and KdpSendWaitContinue(). |
|
|
Definition at line 63 of file kdp.h. Referenced by KdpReceivePacket(), KdpReceivePacketLeader(), KdpSendPacket(), and KdpSendWaitContinue(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 60 of file kdbreak.c.
|
|
|
Definition at line 826 of file kdbreak.c.
|
|
||||||||||||
|
Definition at line 902 of file kdbreak.c.
|
|
|
|
|
||||||||||||||||
|
Definition at line 1461 of file kdapi.c. References ASSERT, KdpQuickMoveMemory(), KdpSendPacket(), KeGetCurrentPrcb, KeNumberProcessors, KiProcessorBlock, and USHORT.
|
|
||||||||||||
|
Definition at line 183 of file alpha/kdcpuapi.c.
|
|
|
|
|
||||||||||||||||
|
Definition at line 31 of file kdmove.c.
|
|
|
Definition at line 165 of file kdlock.c.
|
|
|
Definition at line 26 of file kdlock.c.
|
|
|
Definition at line 60 of file kdlock.c.
|
|
|
Definition at line 30 of file kddbgio.c.
|
|
||||||||||||
|
Definition at line 110 of file kddbgio.c.
|
|
||||||||||||||||
|
Definition at line 150 of file kdmove.c.
|
|
|
|
|
||||||||||||||||
|
Definition at line 212 of file alpha/kdcpuapi.c. References ASSERT, Buffer, KDP_MESSAGE_BUFFER_SIZE, KdpGetCurrentPrcb(), KdpGetCurrentThread(), KdpGetPcr(), KdpReadInternalProcessorCounters(), KdpReadInternalProcessorState(), KdpSendPacket(), and USHORT.
|
|
||||||||||||||||
|
Definition at line 499 of file alpha/kdcpuapi.c. References ASSERT, BusNumber, HalTranslateBusAddress(), InterfaceType, KdpSendPacket(), NULL, and PUSHORT.
|
|
||||||||||||||||
|
Definition at line 1095 of file i386/kdcpuapi.c. References ASSERT, EXCEPTION_EXECUTE_HANDLER, KdpSendPacket(), NULL, and RDMSR().
|
|
||||||||||||||||
|
Definition at line 2534 of file kdapi.c. References ASSERT, BYTE_OFFSET, KdpMoveMemory(), KdpSendPacket(), MmDbgTranslatePhysicalAddress(), NULL, PAGE_ALIGN, PAGE_SIZE, and USHORT.
|
|
||||||||||||||||
|
Definition at line 1139 of file kdapi.c. References KdpMoveMemory(), KdpSendPacket(), and USHORT.
|
|
||||||||||||||||
|
Definition at line 1215 of file kdapi.c. References KdpSendPacket(), MmDbgReadCheck64(), and USHORT. Referenced by KdpSendWaitContinue().
|
|
|
Definition at line 25 of file alpha/kdreboot.c.
|
|
||||||||||||||||||||
|
Definition at line 342 of file kdcomio.c.
|
|
||||||||||||
|
Definition at line 95 of file kdcomio.c.
|
|
||||||||||||||||
|
Definition at line 2351 of file kdapi.c.
|
|
||||||||||||||||||||
|
Definition at line 2434 of file kdapi.c.
|
|
|
Definition at line 1309 of file kdbreak.c.
|
|
||||||||||||||||
|
Definition at line 1632 of file kdapi.c. References ASSERT, KdpDeleteBreakpoint(), KdpSendPacket(), and NULL.
|
|
||||||||||||||||
|
Definition at line 683 of file kdcomio.c.
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 1521 of file kdapi.c. References ASSERT, KdpQuickMoveMemory(), KdpSendPacket(), KeGetCurrentPrcb, KeNumberProcessors, KiProcessorBlock, NULL, and USHORT.
|
|
||||||||||||
|
Definition at line 36 of file alpha/kdcpuapi.c. References Count, End, FALSE, KdpDeleteBreakpointRange(), KdpMoveMemory(), and USHORT.
|
|
||||||||||||||||||||
|
Definition at line 98 of file alpha/kdcpuapi.c. References Count, End, FALSE, KdpDeleteBreakpointRange(), KdpGetCurrentPrcb(), KdpGetCurrentThread(), KdpMoveMemory(), KdpQuickMoveMemory(), KeNumberProcessors, KeProcessorLevel, and USHORT.
|
|
||||||||||||||||||||||||||||
|
Definition at line 386 of file alpha/kdtrap.c.
|
|
|
Definition at line 972 of file kdbreak.c.
|
|
|
Definition at line 954 of file kdbreak.c.
|
|
||||||||||||||||
|
Definition at line 2318 of file kdapi.c.
|
|
||||||||||||||||||||
|
Definition at line 494 of file kdapi.c.
|
|
|
Definition at line 528 of file kdapi.c.
|
|
||||||||||||||||||||||||||||
|
Definition at line 28 of file alpha/kdtrap.c.
|
|
||||||||||||||||
|
Definition at line 1580 of file kdapi.c. References ASSERT, KdpAddBreakpoint(), KdpSendPacket(), and NULL.
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 451 of file alpha/kdcpuapi.c. References KdpSendPacket().
|
|
||||||||||||||||
|
Definition at line 779 of file alpha/kdcpuapi.c. References ASSERT, BusNumber, HalTranslateBusAddress(), InterfaceType, KdpSendPacket(), NULL, PUSHORT, and USHORT.
|
|
||||||||||||||||
|
Definition at line 1153 of file i386/kdcpuapi.c. References ASSERT, EXCEPTION_EXECUTE_HANDLER, KdpSendPacket(), NULL, and WRMSR().
|
|
||||||||||||||||
|
Definition at line 2680 of file kdapi.c. References BYTE_OFFSET, KdpMoveMemory(), KdpSendPacket(), MmDbgTranslatePhysicalAddress(), NULL, PAGE_ALIGN, PAGE_SIZE, and USHORT.
|
|
||||||||||||||||
|
Definition at line 1308 of file kdapi.c. References KdpMoveMemory(), KdpSendPacket(), and NULL.
|
|
||||||||||||||||
|
Definition at line 1375 of file kdapi.c. References KdpSendPacket(), MmDbgWriteCheck64(), and NULL. Referenced by KdpSendWaitContinue().
|
|
|
Referenced by KdpGetVersion(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 437 of file kdp.h. Referenced by KdDisableDebugger(), KdInitSystem(), and KiDispatchException(). |
|
|
Definition at line 438 of file kdp.h. Referenced by KdInitSystem(), and KiFreezeTargetExecution(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.7