mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[FORMATTING] Fix the indentation mess in KDBG and use a consistent 4 spaces indentation.
svn path=/trunk/; revision=43014
This commit is contained in:
parent
5221d11896
commit
3e4016ea24
|
@ -69,10 +69,12 @@ KdPortPutByteEx(
|
||||||
#if defined(KDBG) || DBG
|
#if defined(KDBG) || DBG
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule);
|
KdbSymLoadUserModuleSymbols(
|
||||||
|
IN PLDR_DATA_TABLE_ENTRY LdrModule);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymFreeProcessSymbols(IN PEPROCESS Process);
|
KdbSymFreeProcessSymbols(
|
||||||
|
IN PEPROCESS Process);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymLoadDriverSymbols(
|
KdbSymLoadDriverSymbols(
|
||||||
|
@ -81,21 +83,27 @@ KdbSymLoadDriverSymbols(
|
||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymUnloadDriverSymbols(IN PLDR_DATA_TABLE_ENTRY ModuleObject);
|
KdbSymUnloadDriverSymbols(
|
||||||
|
IN PLDR_DATA_TABLE_ENTRY ModuleObject);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymProcessBootSymbols(IN PANSI_STRING AnsiFileName,
|
KdbSymProcessBootSymbols(
|
||||||
IN BOOLEAN FullName,
|
IN PANSI_STRING AnsiFileName,
|
||||||
IN BOOLEAN LoadFromFile);
|
IN BOOLEAN FullName,
|
||||||
|
IN BOOLEAN LoadFromFile);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymProcessSymbols(IN PANSI_STRING FileName, IN PKD_SYMBOLS_INFO SymbolInfo);
|
KdbSymProcessSymbols(
|
||||||
|
IN PANSI_STRING FileName,
|
||||||
|
IN PKD_SYMBOLS_INFO SymbolInfo);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
KdbSymPrintAddress(IN PVOID Address);
|
KdbSymPrintAddress(
|
||||||
|
IN PVOID Address);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbDeleteProcessHook(IN PEPROCESS Process);
|
KdbDeleteProcessHook(
|
||||||
|
IN PEPROCESS Process);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
KdbSymGetAddressInformation(
|
KdbSymGetAddressInformation(
|
||||||
|
@ -112,38 +120,39 @@ typedef struct _KDB_MODULE_INFO
|
||||||
ULONG_PTR Base;
|
ULONG_PTR Base;
|
||||||
ULONG Size;
|
ULONG Size;
|
||||||
PROSSYM_INFO RosSymInfo;
|
PROSSYM_INFO RosSymInfo;
|
||||||
} KDB_MODULE_INFO, *PKDB_MODULE_INFO;
|
}
|
||||||
|
KDB_MODULE_INFO, *PKDB_MODULE_INFO;
|
||||||
|
|
||||||
/* MACROS FOR NON-KDBG BUILDS ************************************************/
|
/* MACROS FOR NON-KDBG BUILDS ************************************************/
|
||||||
|
|
||||||
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) KdbSymLoadUserModuleSymbols(LDRMOD)
|
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) KdbSymLoadUserModuleSymbols(LDRMOD)
|
||||||
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) KdbSymLoadDriverSymbols(FILENAME, MODULE)
|
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) KdbSymLoadDriverSymbols(FILENAME, MODULE)
|
||||||
# define KDB_UNLOADDRIVER_HOOK(MODULE) KdbSymUnloadDriverSymbols(MODULE)
|
# define KDB_UNLOADDRIVER_HOOK(MODULE) KdbSymUnloadDriverSymbols(MODULE)
|
||||||
# define KDB_SYMBOLFILE_HOOK(FILENAME, SYMBOLINFO) KdbSymProcessSymbols((FILENAME), (SYMBOLINFO))
|
# define KDB_SYMBOLFILE_HOOK(FILENAME, SYMBOLINFO) KdbSymProcessSymbols((FILENAME), (SYMBOLINFO))
|
||||||
#else
|
#else
|
||||||
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
|
# define KDB_LOADUSERMODULE_HOOK(LDRMOD) do { } while (0)
|
||||||
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) do { } while (0)
|
# define KDB_LOADDRIVER_HOOK(FILENAME, MODULE) do { } while (0)
|
||||||
# define KDB_UNLOADDRIVER_HOOK(MODULE) do { } while (0)
|
# define KDB_UNLOADDRIVER_HOOK(MODULE) do { } while (0)
|
||||||
# define KDB_SYMBOLFILE_HOOK(FILENAME, SYMBOLINFO) do { } while (0)
|
# define KDB_SYMBOLFILE_HOOK(FILENAME, SYMBOLINFO) do { } while (0)
|
||||||
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
|
# define KDB_CREATE_THREAD_HOOK(CONTEXT) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(KDBG) || DBG
|
#if defined(KDBG) || DBG
|
||||||
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
# define KeRosPrintAddress(ADDRESS) KdbSymPrintAddress(ADDRESS)
|
||||||
#else
|
#else
|
||||||
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
|
# define KeRosPrintAddress(ADDRESS) KiRosPrintAddress(ADDRESS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KDBG
|
#ifdef KDBG
|
||||||
# define KdbInit() KdbpCliInit()
|
# define KdbInit() KdbpCliInit()
|
||||||
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
# define KdbModuleLoaded(FILENAME) KdbpCliModuleLoaded(FILENAME)
|
||||||
# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
|
# define KDB_DELETEPROCESS_HOOK(PROCESS) KdbDeleteProcessHook(PROCESS)
|
||||||
#else
|
#else
|
||||||
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
|
# define KdbEnterDebuggerException(ER, PM, C, TF, F) kdHandleException
|
||||||
# define KdbInit() do { } while (0)
|
# define KdbInit() do { } while (0)
|
||||||
# define KdbEnter() do { } while (0)
|
# define KdbEnter() do { } while (0)
|
||||||
# define KdbModuleLoaded(X) do { } while (0)
|
# define KdbModuleLoaded(X) do { } while (0)
|
||||||
# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
|
# define KDB_DELETEPROCESS_HOOK(PROCESS) do { } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* KD ROUTINES ***************************************************************/
|
/* KD ROUTINES ***************************************************************/
|
||||||
|
@ -153,7 +162,8 @@ typedef enum _KD_CONTINUE_TYPE
|
||||||
kdContinue = 0,
|
kdContinue = 0,
|
||||||
kdDoNotHandleException,
|
kdDoNotHandleException,
|
||||||
kdHandleException
|
kdHandleException
|
||||||
} KD_CONTINUE_TYPE;
|
}
|
||||||
|
KD_CONTINUE_TYPE;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
|
@ -327,7 +337,8 @@ typedef struct _KDP_DEBUG_MODE
|
||||||
/* Generic Value */
|
/* Generic Value */
|
||||||
ULONG Value;
|
ULONG Value;
|
||||||
};
|
};
|
||||||
} KDP_DEBUG_MODE;
|
}
|
||||||
|
KDP_DEBUG_MODE;
|
||||||
|
|
||||||
/* KD Internal Debug Services */
|
/* KD Internal Debug Services */
|
||||||
typedef enum _KDP_DEBUG_SERVICE
|
typedef enum _KDP_DEBUG_SERVICE
|
||||||
|
@ -344,7 +355,8 @@ typedef enum _KDP_DEBUG_SERVICE
|
||||||
KdSpare3 = 0x24, /* j */
|
KdSpare3 = 0x24, /* j */
|
||||||
EnterDebugger = 0x25, /* k */
|
EnterDebugger = 0x25, /* k */
|
||||||
ThatsWhatSheSaid = 69 /* FIGURE IT OUT */
|
ThatsWhatSheSaid = 69 /* FIGURE IT OUT */
|
||||||
} KDP_DEBUG_SERVICE;
|
}
|
||||||
|
KDP_DEBUG_SERVICE;
|
||||||
|
|
||||||
/* Dispatch Table for Wrapper Functions */
|
/* Dispatch Table for Wrapper Functions */
|
||||||
typedef struct _KD_DISPATCH_TABLE
|
typedef struct _KD_DISPATCH_TABLE
|
||||||
|
@ -354,7 +366,8 @@ typedef struct _KD_DISPATCH_TABLE
|
||||||
PKDP_PRINT_ROUTINE KdpPrintRoutine;
|
PKDP_PRINT_ROUTINE KdpPrintRoutine;
|
||||||
PKDP_PROMPT_ROUTINE KdpPromptRoutine;
|
PKDP_PROMPT_ROUTINE KdpPromptRoutine;
|
||||||
PKDP_EXCEPTION_ROUTINE KdpExceptionRoutine;
|
PKDP_EXCEPTION_ROUTINE KdpExceptionRoutine;
|
||||||
} KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE;
|
}
|
||||||
|
KD_DISPATCH_TABLE, *PKD_DISPATCH_TABLE;
|
||||||
|
|
||||||
/* The current Debugging Mode */
|
/* The current Debugging Mode */
|
||||||
extern KDP_DEBUG_MODE KdpDebugMode;
|
extern KDP_DEBUG_MODE KdpDebugMode;
|
||||||
|
|
|
@ -4,136 +4,137 @@
|
||||||
|
|
||||||
.globl _KdbEnter
|
.globl _KdbEnter
|
||||||
_KdbEnter:
|
_KdbEnter:
|
||||||
/*
|
/*
|
||||||
* Set up a trap frame
|
* Set up a trap frame
|
||||||
*/
|
*/
|
||||||
pushfl /* Eflags */
|
pushfl /* Eflags */
|
||||||
pushl %cs /* Cs */
|
pushl %cs /* Cs */
|
||||||
pushl $0 /* ErrorCode */
|
pushl $0 /* ErrorCode */
|
||||||
pushl %ebp /* Ebp */
|
pushl %ebp /* Ebp */
|
||||||
pushl %ebx /* Ebx */
|
pushl %ebx /* Ebx */
|
||||||
movl 20(%esp), %ebp /* Eip */
|
movl 20(%esp), %ebp /* Eip */
|
||||||
movl 16(%esp), %ebx /* Eflags */
|
movl 16(%esp), %ebx /* Eflags */
|
||||||
movl %ebx, 20(%esp)
|
movl %ebx, 20(%esp)
|
||||||
movl 12(%esp), %ebx /* Cs */
|
movl 12(%esp), %ebx /* Cs */
|
||||||
movl %ebx, 16(%esp)
|
movl %ebx, 16(%esp)
|
||||||
movl %ebp, 12(%esp)
|
movl %ebp, 12(%esp)
|
||||||
pushl %esi /* Esi */
|
pushl %esi /* Esi */
|
||||||
pushl %edi /* Edi */
|
pushl %edi /* Edi */
|
||||||
pushl %fs /* Fs */
|
pushl %fs /* Fs */
|
||||||
pushl $0 /* ExceptionList */
|
pushl $0 /* ExceptionList */
|
||||||
pushl $0 /* PreviousMode */
|
pushl $0 /* PreviousMode */
|
||||||
pushl %eax /* Eax */
|
pushl %eax /* Eax */
|
||||||
pushl %ecx /* Ecx */
|
pushl %ecx /* Ecx */
|
||||||
pushl %edx /* Edx */
|
pushl %edx /* Edx */
|
||||||
pushl %ds /* Ds */
|
pushl %ds /* Ds */
|
||||||
pushl %es /* Es */
|
pushl %es /* Es */
|
||||||
pushl %gs /* Gs */
|
pushl %gs /* Gs */
|
||||||
movl %dr7, %eax
|
movl %dr7, %eax
|
||||||
pushl %eax /* Dr7 */
|
pushl %eax /* Dr7 */
|
||||||
/* Clear all breakpoint enables in dr7. */
|
|
||||||
andl $0xFFFF0000, %eax
|
|
||||||
movl %eax, %dr7
|
|
||||||
movl %dr6, %eax
|
|
||||||
pushl %eax /* Dr6 */
|
|
||||||
movl %dr3, %eax
|
|
||||||
pushl %eax /* Dr3 */
|
|
||||||
movl %dr2, %eax
|
|
||||||
pushl %eax /* Dr2 */
|
|
||||||
movl %dr1, %eax
|
|
||||||
pushl %eax /* Dr1 */
|
|
||||||
movl %dr0, %eax
|
|
||||||
pushl %eax /* Dr0 */
|
|
||||||
leal 0x58(%esp), %eax
|
|
||||||
pushl %eax /* TempEsp */
|
|
||||||
pushl %ss /* TempSegSs */
|
|
||||||
pushl $0 /* DebugPointer */
|
|
||||||
pushl $3 /* DebugArgMark (Exception number) */
|
|
||||||
pushl 0x60(%esp) /* DebugEip */
|
|
||||||
pushl %ebp /* DebugEbp */
|
|
||||||
|
|
||||||
/*
|
/* Clear all breakpoint enables in dr7. */
|
||||||
* Call KDB
|
andl $0xFFFF0000, %eax
|
||||||
*/
|
movl %eax, %dr7
|
||||||
movl %esp, %eax
|
movl %dr6, %eax
|
||||||
pushl $1 /* FirstChance */
|
pushl %eax /* Dr6 */
|
||||||
pushl %eax /* Push a pointer to the trap frame */
|
movl %dr3, %eax
|
||||||
pushl $0 /* Context */
|
pushl %eax /* Dr3 */
|
||||||
pushl $0 /* PreviousMode (KernelMode) */
|
movl %dr2, %eax
|
||||||
pushl $0 /* ExceptionRecord */
|
pushl %eax /* Dr2 */
|
||||||
call _KdbEnterDebuggerException
|
movl %dr1, %eax
|
||||||
|
pushl %eax /* Dr1 */
|
||||||
|
movl %dr0, %eax
|
||||||
|
pushl %eax /* Dr0 */
|
||||||
|
leal 0x58(%esp), %eax
|
||||||
|
pushl %eax /* TempEsp */
|
||||||
|
pushl %ss /* TempSegSs */
|
||||||
|
pushl $0 /* DebugPointer */
|
||||||
|
pushl $3 /* DebugArgMark (Exception number) */
|
||||||
|
pushl 0x60(%esp) /* DebugEip */
|
||||||
|
pushl %ebp /* DebugEbp */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pop the arguments and unused portions of the trap frame:
|
* Call KDB
|
||||||
* DebugEbp
|
*/
|
||||||
* DebugEip
|
movl %esp, %eax
|
||||||
* DebugArgMark
|
pushl $1 /* FirstChance */
|
||||||
* DebugPointer
|
pushl %eax /* Push a pointer to the trap frame */
|
||||||
* TempSegSs
|
pushl $0 /* Context */
|
||||||
* TempEsp
|
pushl $0 /* PreviousMode (KernelMode) */
|
||||||
*/
|
pushl $0 /* ExceptionRecord */
|
||||||
addl $(11*4), %esp
|
call _KdbEnterDebuggerException
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Restore/update debugging registers.
|
* Pop the arguments and unused portions of the trap frame:
|
||||||
*/
|
* DebugEbp
|
||||||
popl %eax /* Dr0 */
|
* DebugEip
|
||||||
movl %eax, %dr0
|
* DebugArgMark
|
||||||
popl %eax /* Dr1 */
|
* DebugPointer
|
||||||
movl %eax, %dr1
|
* TempSegSs
|
||||||
popl %eax /* Dr2 */
|
* TempEsp
|
||||||
movl %eax, %dr2
|
*/
|
||||||
popl %eax /* Dr3 */
|
addl $(11*4), %esp
|
||||||
movl %eax, %dr3
|
|
||||||
popl %eax /* Dr6 */
|
|
||||||
movl %eax, %dr6
|
|
||||||
popl %eax /* Dr7 */
|
|
||||||
movl %eax, %dr7
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Restore registers including any that might have been changed
|
* Restore/update debugging registers.
|
||||||
* inside the debugger.
|
*/
|
||||||
*/
|
popl %eax /* Dr0 */
|
||||||
popl %gs /* Gs */
|
movl %eax, %dr0
|
||||||
popl %es /* Es */
|
popl %eax /* Dr1 */
|
||||||
popl %ds /* Ds */
|
movl %eax, %dr1
|
||||||
popl %edx /* Edx */
|
popl %eax /* Dr2 */
|
||||||
popl %ecx /* Ecx */
|
movl %eax, %dr2
|
||||||
popl %eax /* Eax */
|
popl %eax /* Dr3 */
|
||||||
addl $8, %esp /* PreviousMode, ExceptionList */
|
movl %eax, %dr3
|
||||||
popl %fs /* Fs */
|
popl %eax /* Dr6 */
|
||||||
popl %edi /* Edi */
|
movl %eax, %dr6
|
||||||
popl %esi /* Esi */
|
popl %eax /* Dr7 */
|
||||||
popl %ebx /* Ebx */
|
movl %eax, %dr7
|
||||||
popl %ebp /* Ebp */
|
|
||||||
addl $4, %esp /* ErrorCode */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return to the caller.
|
* Restore registers including any that might have been changed
|
||||||
*/
|
* inside the debugger.
|
||||||
iret
|
*/
|
||||||
|
popl %gs /* Gs */
|
||||||
|
popl %es /* Es */
|
||||||
|
popl %ds /* Ds */
|
||||||
|
popl %edx /* Edx */
|
||||||
|
popl %ecx /* Ecx */
|
||||||
|
popl %eax /* Eax */
|
||||||
|
addl $8, %esp /* PreviousMode, ExceptionList */
|
||||||
|
popl %fs /* Fs */
|
||||||
|
popl %edi /* Edi */
|
||||||
|
popl %esi /* Esi */
|
||||||
|
popl %ebx /* Ebx */
|
||||||
|
popl %ebp /* Ebp */
|
||||||
|
addl $4, %esp /* ErrorCode */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return to the caller.
|
||||||
|
*/
|
||||||
|
iret
|
||||||
|
|
||||||
|
|
||||||
.globl _KdbpStackSwitchAndCall@8
|
.globl _KdbpStackSwitchAndCall@8
|
||||||
_KdbpStackSwitchAndCall@8:
|
_KdbpStackSwitchAndCall@8:
|
||||||
pushl %ebp
|
pushl %ebp
|
||||||
movl %esp, %ebp
|
movl %esp, %ebp
|
||||||
|
|
||||||
movl 0x8(%esp), %eax /* New stack */
|
|
||||||
movl 0xC(%esp), %ecx /* Function to call */
|
|
||||||
movl %esp, %edx /* Old stack */
|
|
||||||
|
|
||||||
/* Switch stack */
|
movl 0x8(%esp), %eax /* New stack */
|
||||||
movl %eax, %esp
|
movl 0xC(%esp), %ecx /* Function to call */
|
||||||
pushl %edx
|
movl %esp, %edx /* Old stack */
|
||||||
|
|
||||||
/* Call function */
|
/* Switch stack */
|
||||||
call *%ecx
|
movl %eax, %esp
|
||||||
|
pushl %edx
|
||||||
|
|
||||||
/* Switch back to old stack */
|
/* Call function */
|
||||||
popl %esp
|
call *%ecx
|
||||||
|
|
||||||
/* Return */
|
/* Switch back to old stack */
|
||||||
popl %ebp
|
popl %esp
|
||||||
ret $8
|
|
||||||
|
/* Return */
|
||||||
|
popl %ebp
|
||||||
|
ret $8
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -37,21 +37,21 @@
|
||||||
|
|
||||||
static unsigned char keyb_layout[2][128] =
|
static unsigned char keyb_layout[2][128] =
|
||||||
{
|
{
|
||||||
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
|
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
|
||||||
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
|
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
|
||||||
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
|
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
|
||||||
"bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
"bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
||||||
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
||||||
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
||||||
"\r\000/" /* 0x60 - 0x6f */
|
"\r\000/" /* 0x60 - 0x6f */
|
||||||
,
|
,
|
||||||
"\000\033!@#$%^&*()_+\177\t" /* 0x00 - 0x0f */
|
"\000\033!@#$%^&*()_+\177\t" /* 0x00 - 0x0f */
|
||||||
"QWERTYUIOP{}\r\000AS" /* 0x10 - 0x1f */
|
"QWERTYUIOP{}\r\000AS" /* 0x10 - 0x1f */
|
||||||
"DFGHJKL:\"`\000\\ZXCV" /* 0x20 - 0x2f */
|
"DFGHJKL:\"`\000\\ZXCV" /* 0x20 - 0x2f */
|
||||||
"BNM<>?\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
"BNM<>?\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
||||||
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
||||||
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
||||||
"\r\000/" /* 0x60 - 0x6f */
|
"\r\000/" /* 0x60 - 0x6f */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef UCHAR byte_t;
|
typedef UCHAR byte_t;
|
||||||
|
@ -86,6 +86,7 @@ KbdSendCommandToMouse(UCHAR Command)
|
||||||
KeStallExecutionProcessor(50);
|
KeStallExecutionProcessor(50);
|
||||||
|
|
||||||
if (kbd_read_input() != MOUSE_ACK) { ; }
|
if (kbd_read_input() != MOUSE_ACK) { ; }
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,29 +109,40 @@ KdbpTryGetCharKeyboard(PULONG ScanCode, ULONG Retry)
|
||||||
static byte_t shift = 0;
|
static byte_t shift = 0;
|
||||||
char c;
|
char c;
|
||||||
BOOLEAN KeepRetrying = (Retry == 0);
|
BOOLEAN KeepRetrying = (Retry == 0);
|
||||||
while (KeepRetrying || Retry-- > 0) {
|
|
||||||
unsigned char status = kbd_read_status();
|
while (KeepRetrying || Retry-- > 0)
|
||||||
while (status & KBD_STAT_OBF) {
|
{
|
||||||
byte_t scancode;
|
unsigned char status = kbd_read_status();
|
||||||
scancode = kbd_read_input();
|
|
||||||
/* check for SHIFT-keys */
|
while (status & KBD_STAT_OBF)
|
||||||
if (((scancode & 0x7F) == 42) || ((scancode & 0x7F) == 54))
|
{
|
||||||
{
|
byte_t scancode;
|
||||||
shift = !(scancode & 0x80);
|
|
||||||
continue;
|
scancode = kbd_read_input();
|
||||||
}
|
|
||||||
/* ignore all other RELEASED-codes */
|
/* check for SHIFT-keys */
|
||||||
if (scancode & 0x80)
|
if (((scancode & 0x7F) == 42) || ((scancode & 0x7F) == 54))
|
||||||
last_key = 0;
|
{
|
||||||
else if (last_key != scancode)
|
shift = !(scancode & 0x80);
|
||||||
{
|
continue;
|
||||||
//printf("kbd: %d, %d, %c\n", scancode, last_key, keyb_layout[shift][scancode]);
|
}
|
||||||
last_key = scancode;
|
|
||||||
c = keyb_layout[shift][scancode];
|
/* ignore all other RELEASED-codes */
|
||||||
*ScanCode = scancode;
|
if (scancode & 0x80)
|
||||||
if (c > 0) return c;
|
{
|
||||||
}
|
last_key = 0;
|
||||||
}
|
}
|
||||||
|
else if (last_key != scancode)
|
||||||
|
{
|
||||||
|
//printf("kbd: %d, %d, %c\n", scancode, last_key, keyb_layout[shift][scancode]);
|
||||||
|
last_key = scancode;
|
||||||
|
c = keyb_layout[shift][scancode];
|
||||||
|
*ScanCode = scancode;
|
||||||
|
|
||||||
|
if (c > 0)
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
CHAR
|
CHAR
|
||||||
KdbpTryGetCharSerial(ULONG Retry)
|
KdbpTryGetCharSerial(ULONG Retry)
|
||||||
{
|
{
|
||||||
CHAR Result = -1;
|
CHAR Result = -1;
|
||||||
|
|
||||||
if (Retry == 0)
|
if (Retry == 0)
|
||||||
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result));
|
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result));
|
||||||
else
|
else
|
||||||
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result) && Retry-- > 0);
|
while (!KdPortGetByteEx(&SerialPortInfo, (PUCHAR)&Result) && Retry-- > 0);
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,12 +16,14 @@
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
typedef struct _IMAGE_SYMBOL_INFO_CACHE {
|
typedef struct _IMAGE_SYMBOL_INFO_CACHE
|
||||||
LIST_ENTRY ListEntry;
|
{
|
||||||
ULONG RefCount;
|
LIST_ENTRY ListEntry;
|
||||||
UNICODE_STRING FileName;
|
ULONG RefCount;
|
||||||
PROSSYM_INFO RosSymInfo;
|
UNICODE_STRING FileName;
|
||||||
} IMAGE_SYMBOL_INFO_CACHE, *PIMAGE_SYMBOL_INFO_CACHE;
|
PROSSYM_INFO RosSymInfo;
|
||||||
|
}
|
||||||
|
IMAGE_SYMBOL_INFO_CACHE, *PIMAGE_SYMBOL_INFO_CACHE;
|
||||||
|
|
||||||
static BOOLEAN LoadSymbols;
|
static BOOLEAN LoadSymbols;
|
||||||
static LIST_ENTRY SymbolFileListHead;
|
static LIST_ENTRY SymbolFileListHead;
|
||||||
|
@ -45,55 +47,52 @@ BOOLEAN KdbpSymbolsInitialized = FALSE;
|
||||||
* \sa KdbpSymFindModule
|
* \sa KdbpSymFindModule
|
||||||
*/
|
*/
|
||||||
static BOOLEAN
|
static BOOLEAN
|
||||||
KdbpSymFindUserModule(IN PVOID Address OPTIONAL,
|
KdbpSymFindUserModule(
|
||||||
IN LPCWSTR Name OPTIONAL,
|
IN PVOID Address OPTIONAL,
|
||||||
IN INT Index OPTIONAL,
|
IN LPCWSTR Name OPTIONAL,
|
||||||
OUT PKDB_MODULE_INFO pInfo)
|
IN INT Index OPTIONAL,
|
||||||
|
OUT PKDB_MODULE_INFO pInfo)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY current_entry;
|
PLIST_ENTRY current_entry;
|
||||||
PLDR_DATA_TABLE_ENTRY current;
|
PLDR_DATA_TABLE_ENTRY current;
|
||||||
PEPROCESS CurrentProcess;
|
PEPROCESS CurrentProcess;
|
||||||
PPEB Peb = NULL;
|
PPEB Peb = NULL;
|
||||||
INT Count = 0;
|
INT Count = 0;
|
||||||
INT Length;
|
INT Length;
|
||||||
|
|
||||||
if (!KdbpSymbolsInitialized)
|
if (!KdbpSymbolsInitialized)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
CurrentProcess = PsGetCurrentProcess();
|
CurrentProcess = PsGetCurrentProcess();
|
||||||
if (CurrentProcess != NULL)
|
if (CurrentProcess)
|
||||||
|
Peb = CurrentProcess->Peb;
|
||||||
|
|
||||||
|
if (!Peb || !Peb->Ldr)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
current_entry = Peb->Ldr->InLoadOrderModuleList.Flink;
|
||||||
|
|
||||||
|
while (current_entry != &Peb->Ldr->InLoadOrderModuleList && current_entry)
|
||||||
{
|
{
|
||||||
Peb = CurrentProcess->Peb;
|
current = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
||||||
}
|
Length = min(current->BaseDllName.Length / sizeof(WCHAR), 255);
|
||||||
|
if ((Address && (Address >= (PVOID)current->DllBase &&
|
||||||
if (Peb == NULL || Peb->Ldr == NULL)
|
Address < (PVOID)((char *)current->DllBase + current->SizeOfImage))) ||
|
||||||
{
|
(Name && _wcsnicmp(current->BaseDllName.Buffer, Name, Length) == 0) ||
|
||||||
return FALSE;
|
(Index >= 0 && Count++ == Index))
|
||||||
}
|
|
||||||
|
|
||||||
current_entry = Peb->Ldr->InLoadOrderModuleList.Flink;
|
|
||||||
|
|
||||||
while (current_entry != &Peb->Ldr->InLoadOrderModuleList &&
|
|
||||||
current_entry != NULL)
|
|
||||||
{
|
|
||||||
current = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
|
||||||
Length = min(current->BaseDllName.Length / sizeof(WCHAR), 255);
|
|
||||||
if ((Address != NULL && (Address >= (PVOID)current->DllBase &&
|
|
||||||
Address < (PVOID)((char *)current->DllBase + current->SizeOfImage))) ||
|
|
||||||
(Name != NULL && _wcsnicmp(current->BaseDllName.Buffer, Name, Length) == 0) ||
|
|
||||||
(Index >= 0 && Count++ == Index))
|
|
||||||
{
|
{
|
||||||
wcsncpy(pInfo->Name, current->BaseDllName.Buffer, Length);
|
wcsncpy(pInfo->Name, current->BaseDllName.Buffer, Length);
|
||||||
pInfo->Name[Length] = L'\0';
|
pInfo->Name[Length] = L'\0';
|
||||||
pInfo->Base = (ULONG_PTR)current->DllBase;
|
pInfo->Base = (ULONG_PTR)current->DllBase;
|
||||||
pInfo->Size = current->SizeOfImage;
|
pInfo->Size = current->SizeOfImage;
|
||||||
pInfo->RosSymInfo = current->PatchInformation;
|
pInfo->RosSymInfo = current->PatchInformation;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
current_entry = current_entry->Flink;
|
|
||||||
|
current_entry = current_entry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Find a kernel-mode module...
|
/*! \brief Find a kernel-mode module...
|
||||||
|
@ -103,42 +102,44 @@ KdbpSymFindUserModule(IN PVOID Address OPTIONAL,
|
||||||
* \sa KdbpSymFindUserModule
|
* \sa KdbpSymFindUserModule
|
||||||
*/
|
*/
|
||||||
static BOOLEAN
|
static BOOLEAN
|
||||||
KdbpSymFindModule(IN PVOID Address OPTIONAL,
|
KdbpSymFindModule(
|
||||||
IN LPCWSTR Name OPTIONAL,
|
IN PVOID Address OPTIONAL,
|
||||||
IN INT Index OPTIONAL,
|
IN LPCWSTR Name OPTIONAL,
|
||||||
OUT PKDB_MODULE_INFO pInfo)
|
IN INT Index OPTIONAL,
|
||||||
|
OUT PKDB_MODULE_INFO pInfo)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY current_entry;
|
PLIST_ENTRY current_entry;
|
||||||
PLDR_DATA_TABLE_ENTRY current;
|
PLDR_DATA_TABLE_ENTRY current;
|
||||||
INT Count = 0;
|
INT Count = 0;
|
||||||
INT Length;
|
INT Length;
|
||||||
|
|
||||||
if (!KdbpSymbolsInitialized)
|
if (!KdbpSymbolsInitialized)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
current_entry = PsLoadedModuleList.Flink;
|
current_entry = PsLoadedModuleList.Flink;
|
||||||
|
|
||||||
while (current_entry != &PsLoadedModuleList)
|
while (current_entry != &PsLoadedModuleList)
|
||||||
{
|
{
|
||||||
current = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
current = CONTAINING_RECORD(current_entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
||||||
|
|
||||||
Length = min(current->BaseDllName.Length / sizeof(WCHAR), 255);
|
Length = min(current->BaseDllName.Length / sizeof(WCHAR), 255);
|
||||||
if ((Address != NULL && (Address >= (PVOID)current->DllBase &&
|
if ((Address && (Address >= (PVOID)current->DllBase &&
|
||||||
Address < (PVOID)((ULONG_PTR)current->DllBase + current->SizeOfImage))) ||
|
Address < (PVOID)((ULONG_PTR)current->DllBase + current->SizeOfImage))) ||
|
||||||
(Name != NULL && _wcsnicmp(current->BaseDllName.Buffer, Name, Length) == 0) ||
|
(Name && _wcsnicmp(current->BaseDllName.Buffer, Name, Length) == 0) ||
|
||||||
(Index >= 0 && Count++ == Index))
|
(Index >= 0 && Count++ == Index))
|
||||||
{
|
{
|
||||||
wcsncpy(pInfo->Name, current->BaseDllName.Buffer, Length);
|
wcsncpy(pInfo->Name, current->BaseDllName.Buffer, Length);
|
||||||
pInfo->Name[Length] = L'\0';
|
pInfo->Name[Length] = L'\0';
|
||||||
pInfo->Base = (ULONG_PTR)current->DllBase;
|
pInfo->Base = (ULONG_PTR)current->DllBase;
|
||||||
pInfo->Size = current->SizeOfImage;
|
pInfo->Size = current->SizeOfImage;
|
||||||
pInfo->RosSymInfo = current->PatchInformation;
|
pInfo->RosSymInfo = current->PatchInformation;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
current_entry = current_entry->Flink;
|
|
||||||
|
current_entry = current_entry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
return KdbpSymFindUserModule(Address, Name, Index-Count, pInfo);
|
return KdbpSymFindUserModule(Address, Name, Index-Count, pInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Find module by address...
|
/*! \brief Find module by address...
|
||||||
|
@ -154,10 +155,11 @@ KdbpSymFindModule(IN PVOID Address OPTIONAL,
|
||||||
* \sa KdbpSymFindModuleByIndex
|
* \sa KdbpSymFindModuleByIndex
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
KdbpSymFindModuleByAddress(IN PVOID Address,
|
KdbpSymFindModuleByAddress(
|
||||||
OUT PKDB_MODULE_INFO pInfo)
|
IN PVOID Address,
|
||||||
|
OUT PKDB_MODULE_INFO pInfo)
|
||||||
{
|
{
|
||||||
return KdbpSymFindModule(Address, NULL, -1, pInfo);
|
return KdbpSymFindModule(Address, NULL, -1, pInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Find module by name...
|
/*! \brief Find module by name...
|
||||||
|
@ -173,10 +175,11 @@ KdbpSymFindModuleByAddress(IN PVOID Address,
|
||||||
* \sa KdbpSymFindModuleByIndex
|
* \sa KdbpSymFindModuleByIndex
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
KdbpSymFindModuleByName(IN LPCWSTR Name,
|
KdbpSymFindModuleByName(
|
||||||
OUT PKDB_MODULE_INFO pInfo)
|
IN LPCWSTR Name,
|
||||||
|
OUT PKDB_MODULE_INFO pInfo)
|
||||||
{
|
{
|
||||||
return KdbpSymFindModule(NULL, Name, -1, pInfo);
|
return KdbpSymFindModule(NULL, Name, -1, pInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Find module by index...
|
/*! \brief Find module by index...
|
||||||
|
@ -192,10 +195,11 @@ KdbpSymFindModuleByName(IN LPCWSTR Name,
|
||||||
* \sa KdbpSymFindModuleByAddress
|
* \sa KdbpSymFindModuleByAddress
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
KdbpSymFindModuleByIndex(IN INT Index,
|
KdbpSymFindModuleByIndex(
|
||||||
OUT PKDB_MODULE_INFO pInfo)
|
IN INT Index,
|
||||||
|
OUT PKDB_MODULE_INFO pInfo)
|
||||||
{
|
{
|
||||||
return KdbpSymFindModule(NULL, NULL, Index, pInfo);
|
return KdbpSymFindModule(NULL, NULL, Index, pInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Print address...
|
/*! \brief Print address...
|
||||||
|
@ -210,35 +214,36 @@ KdbpSymFindModuleByIndex(IN INT Index,
|
||||||
* \retval FALSE No module containing \a Address was found, nothing was printed.
|
* \retval FALSE No module containing \a Address was found, nothing was printed.
|
||||||
*/
|
*/
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
KdbSymPrintAddress(IN PVOID Address)
|
KdbSymPrintAddress(
|
||||||
|
IN PVOID Address)
|
||||||
{
|
{
|
||||||
KDB_MODULE_INFO Info;
|
KDB_MODULE_INFO Info;
|
||||||
ULONG_PTR RelativeAddress;
|
ULONG_PTR RelativeAddress;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG LineNumber;
|
ULONG LineNumber;
|
||||||
CHAR FileName[256];
|
CHAR FileName[256];
|
||||||
CHAR FunctionName[256];
|
CHAR FunctionName[256];
|
||||||
|
|
||||||
if (!KdbpSymbolsInitialized || !KdbpSymFindModuleByAddress(Address, &Info))
|
if (!KdbpSymbolsInitialized || !KdbpSymFindModuleByAddress(Address, &Info))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
RelativeAddress = (ULONG_PTR) Address - Info.Base;
|
RelativeAddress = (ULONG_PTR) Address - Info.Base;
|
||||||
Status = KdbSymGetAddressInformation(Info.RosSymInfo,
|
Status = KdbSymGetAddressInformation(Info.RosSymInfo,
|
||||||
RelativeAddress,
|
RelativeAddress,
|
||||||
&LineNumber,
|
&LineNumber,
|
||||||
FileName,
|
FileName,
|
||||||
FunctionName);
|
FunctionName);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DbgPrint("<%ws:%x (%s:%d (%s))>",
|
DbgPrint("<%ws:%x (%s:%d (%s))>",
|
||||||
Info.Name, RelativeAddress, FileName, LineNumber, FunctionName);
|
Info.Name, RelativeAddress, FileName, LineNumber, FunctionName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DbgPrint("<%ws:%x>", Info.Name, RelativeAddress);
|
DbgPrint("<%ws:%x>", Info.Name, RelativeAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -259,29 +264,21 @@ KdbSymPrintAddress(IN PVOID Address)
|
||||||
* \retval STATUS_UNSUCCESSFUL None of the requested information was found.
|
* \retval STATUS_UNSUCCESSFUL None of the requested information was found.
|
||||||
*/
|
*/
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo,
|
KdbSymGetAddressInformation(
|
||||||
IN ULONG_PTR RelativeAddress,
|
IN PROSSYM_INFO RosSymInfo,
|
||||||
OUT PULONG LineNumber OPTIONAL,
|
IN ULONG_PTR RelativeAddress,
|
||||||
OUT PCH FileName OPTIONAL,
|
OUT PULONG LineNumber OPTIONAL,
|
||||||
OUT PCH FunctionName OPTIONAL)
|
OUT PCH FileName OPTIONAL,
|
||||||
|
OUT PCH FunctionName OPTIONAL)
|
||||||
{
|
{
|
||||||
if (!KdbpSymbolsInitialized)
|
if (!KdbpSymbolsInitialized ||
|
||||||
|
!RosSymInfo ||
|
||||||
|
!RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineNumber, FileName, FunctionName))
|
||||||
{
|
{
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
|
||||||
|
|
||||||
if (NULL == RosSymInfo)
|
|
||||||
{
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineNumber,
|
return STATUS_SUCCESS;
|
||||||
FileName, FunctionName))
|
|
||||||
{
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Find cached symbol file.
|
/*! \brief Find cached symbol file.
|
||||||
|
@ -297,37 +294,38 @@ KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo,
|
||||||
* \sa KdbpSymAddCachedFile
|
* \sa KdbpSymAddCachedFile
|
||||||
*/
|
*/
|
||||||
static PROSSYM_INFO
|
static PROSSYM_INFO
|
||||||
KdbpSymFindCachedFile(IN PUNICODE_STRING FileName)
|
KdbpSymFindCachedFile(
|
||||||
|
IN PUNICODE_STRING FileName)
|
||||||
{
|
{
|
||||||
PIMAGE_SYMBOL_INFO_CACHE Current;
|
PIMAGE_SYMBOL_INFO_CACHE Current;
|
||||||
PLIST_ENTRY CurrentEntry;
|
PLIST_ENTRY CurrentEntry;
|
||||||
KIRQL Irql;
|
KIRQL Irql;
|
||||||
|
|
||||||
DPRINT("Looking for cached symbol file %wZ\n", FileName);
|
DPRINT("Looking for cached symbol file %wZ\n", FileName);
|
||||||
|
|
||||||
KeAcquireSpinLock(&SymbolFileListLock, &Irql);
|
KeAcquireSpinLock(&SymbolFileListLock, &Irql);
|
||||||
|
|
||||||
CurrentEntry = SymbolFileListHead.Flink;
|
CurrentEntry = SymbolFileListHead.Flink;
|
||||||
while (CurrentEntry != (&SymbolFileListHead))
|
while (CurrentEntry != (&SymbolFileListHead))
|
||||||
{
|
{
|
||||||
Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
|
Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
|
||||||
|
|
||||||
DPRINT("Current->FileName %wZ FileName %wZ\n", &Current->FileName, FileName);
|
DPRINT("Current->FileName %wZ FileName %wZ\n", &Current->FileName, FileName);
|
||||||
if (RtlEqualUnicodeString(&Current->FileName, FileName, TRUE))
|
if (RtlEqualUnicodeString(&Current->FileName, FileName, TRUE))
|
||||||
{
|
{
|
||||||
Current->RefCount++;
|
Current->RefCount++;
|
||||||
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
||||||
DPRINT("Found cached file!\n");
|
DPRINT("Found cached file!\n");
|
||||||
return Current->RosSymInfo;
|
return Current->RosSymInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
||||||
|
|
||||||
DPRINT("Cached file not found!\n");
|
DPRINT("Cached file not found!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Add a symbol file to the cache.
|
/*! \brief Add a symbol file to the cache.
|
||||||
|
@ -338,27 +336,28 @@ KdbpSymFindCachedFile(IN PUNICODE_STRING FileName)
|
||||||
* \sa KdbpSymRemoveCachedFile
|
* \sa KdbpSymRemoveCachedFile
|
||||||
*/
|
*/
|
||||||
static VOID
|
static VOID
|
||||||
KdbpSymAddCachedFile(IN PUNICODE_STRING FileName,
|
KdbpSymAddCachedFile(
|
||||||
IN PROSSYM_INFO RosSymInfo)
|
IN PUNICODE_STRING FileName,
|
||||||
|
IN PROSSYM_INFO RosSymInfo)
|
||||||
{
|
{
|
||||||
PIMAGE_SYMBOL_INFO_CACHE CacheEntry;
|
PIMAGE_SYMBOL_INFO_CACHE CacheEntry;
|
||||||
|
|
||||||
DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo);
|
DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo);
|
||||||
|
|
||||||
/* allocate entry */
|
/* allocate entry */
|
||||||
CacheEntry = ExAllocatePoolWithTag(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE), TAG_KDBS);
|
CacheEntry = ExAllocatePoolWithTag(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE), TAG_KDBS);
|
||||||
ASSERT(CacheEntry);
|
ASSERT(CacheEntry);
|
||||||
RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE));
|
RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE));
|
||||||
|
|
||||||
/* fill entry */
|
/* fill entry */
|
||||||
CacheEntry->FileName.Buffer = ExAllocatePoolWithTag(NonPagedPool,
|
CacheEntry->FileName.Buffer = ExAllocatePoolWithTag(NonPagedPool,
|
||||||
FileName->Length,
|
FileName->Length,
|
||||||
TAG_KDBS);
|
TAG_KDBS);
|
||||||
RtlCopyUnicodeString(&CacheEntry->FileName, FileName);
|
RtlCopyUnicodeString(&CacheEntry->FileName, FileName);
|
||||||
ASSERT(CacheEntry->FileName.Buffer);
|
ASSERT(CacheEntry->FileName.Buffer);
|
||||||
CacheEntry->RefCount = 1;
|
CacheEntry->RefCount = 1;
|
||||||
CacheEntry->RosSymInfo = RosSymInfo;
|
CacheEntry->RosSymInfo = RosSymInfo;
|
||||||
InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); /* FIXME: Lock list? */
|
InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); /* FIXME: Lock list? */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Remove a symbol file (reference) from the cache.
|
/*! \brief Remove a symbol file (reference) from the cache.
|
||||||
|
@ -372,38 +371,40 @@ KdbpSymAddCachedFile(IN PUNICODE_STRING FileName,
|
||||||
* \sa KdbpSymAddCachedFile
|
* \sa KdbpSymAddCachedFile
|
||||||
*/
|
*/
|
||||||
static VOID
|
static VOID
|
||||||
KdbpSymRemoveCachedFile(IN PROSSYM_INFO RosSymInfo)
|
KdbpSymRemoveCachedFile(
|
||||||
|
IN PROSSYM_INFO RosSymInfo)
|
||||||
{
|
{
|
||||||
PIMAGE_SYMBOL_INFO_CACHE Current;
|
PIMAGE_SYMBOL_INFO_CACHE Current;
|
||||||
PLIST_ENTRY CurrentEntry;
|
PLIST_ENTRY CurrentEntry;
|
||||||
KIRQL Irql;
|
KIRQL Irql;
|
||||||
|
|
||||||
KeAcquireSpinLock(&SymbolFileListLock, &Irql);
|
KeAcquireSpinLock(&SymbolFileListLock, &Irql);
|
||||||
|
|
||||||
CurrentEntry = SymbolFileListHead.Flink;
|
CurrentEntry = SymbolFileListHead.Flink;
|
||||||
while (CurrentEntry != (&SymbolFileListHead))
|
while (CurrentEntry != (&SymbolFileListHead))
|
||||||
{
|
{
|
||||||
Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
|
Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry);
|
||||||
|
|
||||||
if (Current->RosSymInfo == RosSymInfo) /* found */
|
if (Current->RosSymInfo == RosSymInfo) /* found */
|
||||||
{
|
{
|
||||||
ASSERT(Current->RefCount > 0);
|
ASSERT(Current->RefCount > 0);
|
||||||
Current->RefCount--;
|
Current->RefCount--;
|
||||||
if (Current->RefCount < 1)
|
if (Current->RefCount < 1)
|
||||||
{
|
{
|
||||||
RemoveEntryList(&Current->ListEntry);
|
RemoveEntryList(&Current->ListEntry);
|
||||||
RosSymDelete(Current->RosSymInfo);
|
RosSymDelete(Current->RosSymInfo);
|
||||||
ExFreePool(Current);
|
ExFreePool(Current);
|
||||||
}
|
}
|
||||||
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
|
||||||
return;
|
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
KeReleaseSpinLock(&SymbolFileListLock, Irql);
|
||||||
DPRINT1("Warning: Removing unknown symbol file: RosSymInfo = %p\n", RosSymInfo);
|
DPRINT1("Warning: Removing unknown symbol file: RosSymInfo = %p\n", RosSymInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Loads a symbol file.
|
/*! \brief Loads a symbol file.
|
||||||
|
@ -414,68 +415,69 @@ KdbpSymRemoveCachedFile(IN PROSSYM_INFO RosSymInfo)
|
||||||
* \sa KdbpSymUnloadModuleSymbols
|
* \sa KdbpSymUnloadModuleSymbols
|
||||||
*/
|
*/
|
||||||
static VOID
|
static VOID
|
||||||
KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName,
|
KdbpSymLoadModuleSymbols(
|
||||||
OUT PROSSYM_INFO *RosSymInfo)
|
IN PUNICODE_STRING FileName,
|
||||||
|
OUT PROSSYM_INFO *RosSymInfo)
|
||||||
{
|
{
|
||||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
HANDLE FileHandle;
|
HANDLE FileHandle;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
IO_STATUS_BLOCK IoStatusBlock;
|
IO_STATUS_BLOCK IoStatusBlock;
|
||||||
|
|
||||||
/* Allow KDB to break on module load */
|
/* Allow KDB to break on module load */
|
||||||
KdbModuleLoaded(FileName);
|
KdbModuleLoaded(FileName);
|
||||||
|
|
||||||
if (! LoadSymbols)
|
if (!LoadSymbols)
|
||||||
{
|
{
|
||||||
*RosSymInfo = NULL;
|
*RosSymInfo = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to find cached (already loaded) symbol file */
|
/* Try to find cached (already loaded) symbol file */
|
||||||
*RosSymInfo = KdbpSymFindCachedFile(FileName);
|
*RosSymInfo = KdbpSymFindCachedFile(FileName);
|
||||||
if (*RosSymInfo != NULL)
|
if (*RosSymInfo)
|
||||||
{
|
{
|
||||||
DPRINT("Found cached symbol file %wZ\n", FileName);
|
DPRINT("Found cached symbol file %wZ\n", FileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Open the file */
|
/* Open the file */
|
||||||
InitializeObjectAttributes(&ObjectAttributes,
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
FileName,
|
FileName,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
DPRINT("Attempting to open image: %wZ\n", FileName);
|
DPRINT("Attempting to open image: %wZ\n", FileName);
|
||||||
|
|
||||||
Status = ZwOpenFile(&FileHandle,
|
Status = ZwOpenFile(&FileHandle,
|
||||||
FILE_READ_ACCESS,
|
FILE_READ_ACCESS,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&IoStatusBlock,
|
&IoStatusBlock,
|
||||||
FILE_SHARE_READ|FILE_SHARE_WRITE,
|
FILE_SHARE_READ|FILE_SHARE_WRITE,
|
||||||
FILE_SYNCHRONOUS_IO_NONALERT);
|
FILE_SYNCHRONOUS_IO_NONALERT);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Could not open image file: %wZ\n", FileName);
|
DPRINT("Could not open image file: %wZ\n", FileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Loading symbols from %wZ...\n", FileName);
|
DPRINT("Loading symbols from %wZ...\n", FileName);
|
||||||
|
|
||||||
if (! RosSymCreateFromFile(&FileHandle, RosSymInfo))
|
if (!RosSymCreateFromFile(&FileHandle, RosSymInfo))
|
||||||
{
|
{
|
||||||
DPRINT("Failed to load symbols from %wZ\n", FileName);
|
DPRINT("Failed to load symbols from %wZ\n", FileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZwClose(FileHandle);
|
ZwClose(FileHandle);
|
||||||
|
|
||||||
DPRINT("Symbols loaded.\n");
|
DPRINT("Symbols loaded.\n");
|
||||||
|
|
||||||
/* add file to cache */
|
/* add file to cache */
|
||||||
KdbpSymAddCachedFile(FileName, *RosSymInfo);
|
KdbpSymAddCachedFile(FileName, *RosSymInfo);
|
||||||
|
|
||||||
DPRINT("Installed symbols: %wZ %p\n", FileName, *RosSymInfo);
|
DPRINT("Installed symbols: %wZ %p\n", FileName, *RosSymInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Unloads symbol info.
|
/*! \brief Unloads symbol info.
|
||||||
|
@ -485,14 +487,13 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName,
|
||||||
* \sa KdbpSymLoadModuleSymbols
|
* \sa KdbpSymLoadModuleSymbols
|
||||||
*/
|
*/
|
||||||
static VOID
|
static VOID
|
||||||
KdbpSymUnloadModuleSymbols(IN PROSSYM_INFO RosSymInfo)
|
KdbpSymUnloadModuleSymbols(
|
||||||
|
IN PROSSYM_INFO RosSymInfo)
|
||||||
{
|
{
|
||||||
DPRINT("Unloading symbols\n");
|
DPRINT("Unloading symbols\n");
|
||||||
|
|
||||||
if (RosSymInfo != NULL)
|
if (RosSymInfo)
|
||||||
{
|
KdbpSymRemoveCachedFile(RosSymInfo);
|
||||||
KdbpSymRemoveCachedFile(RosSymInfo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Load symbol info for a user module.
|
/*! \brief Load symbol info for a user module.
|
||||||
|
@ -500,29 +501,29 @@ KdbpSymUnloadModuleSymbols(IN PROSSYM_INFO RosSymInfo)
|
||||||
* \param LdrModule Pointer to the module to load symbols for.
|
* \param LdrModule Pointer to the module to load symbols for.
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule)
|
KdbSymLoadUserModuleSymbols(
|
||||||
|
IN PLDR_DATA_TABLE_ENTRY LdrModule)
|
||||||
{
|
{
|
||||||
static WCHAR Prefix[] = L"\\??\\";
|
static WCHAR Prefix[] = L"\\??\\";
|
||||||
UNICODE_STRING KernelName;
|
UNICODE_STRING KernelName;
|
||||||
DPRINT("LdrModule %p\n", LdrModule);
|
DPRINT("LdrModule %p\n", LdrModule);
|
||||||
|
|
||||||
LdrModule->PatchInformation = NULL;
|
LdrModule->PatchInformation = NULL;
|
||||||
|
|
||||||
KernelName.MaximumLength = sizeof(Prefix) + LdrModule->FullDllName.Length;
|
KernelName.MaximumLength = sizeof(Prefix) + LdrModule->FullDllName.Length;
|
||||||
KernelName.Length = KernelName.MaximumLength - sizeof(WCHAR);
|
KernelName.Length = KernelName.MaximumLength - sizeof(WCHAR);
|
||||||
KernelName.Buffer = ExAllocatePoolWithTag(NonPagedPool, KernelName.MaximumLength, TAG_KDBS);
|
KernelName.Buffer = ExAllocatePoolWithTag(NonPagedPool, KernelName.MaximumLength, TAG_KDBS);
|
||||||
if (NULL == KernelName.Buffer)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
memcpy(KernelName.Buffer, Prefix, sizeof(Prefix) - sizeof(WCHAR));
|
|
||||||
memcpy(KernelName.Buffer + sizeof(Prefix) / sizeof(WCHAR) - 1, LdrModule->FullDllName.Buffer,
|
|
||||||
LdrModule->FullDllName.Length);
|
|
||||||
KernelName.Buffer[KernelName.Length / sizeof(WCHAR)] = L'\0';
|
|
||||||
|
|
||||||
KdbpSymLoadModuleSymbols(&KernelName, (PROSSYM_INFO*)&LdrModule->PatchInformation);
|
if (!KernelName.Buffer)
|
||||||
|
return;
|
||||||
|
|
||||||
ExFreePool(KernelName.Buffer);
|
memcpy(KernelName.Buffer, Prefix, sizeof(Prefix) - sizeof(WCHAR));
|
||||||
|
memcpy(KernelName.Buffer + sizeof(Prefix) / sizeof(WCHAR) - 1, LdrModule->FullDllName.Buffer, LdrModule->FullDllName.Length);
|
||||||
|
KernelName.Buffer[KernelName.Length / sizeof(WCHAR)] = L'\0';
|
||||||
|
|
||||||
|
KdbpSymLoadModuleSymbols(&KernelName, (PROSSYM_INFO*)&LdrModule->PatchInformation);
|
||||||
|
|
||||||
|
ExFreePool(KernelName.Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Frees all symbols loaded for a process.
|
/*! \brief Frees all symbols loaded for a process.
|
||||||
|
@ -530,36 +531,33 @@ KdbSymLoadUserModuleSymbols(IN PLDR_DATA_TABLE_ENTRY LdrModule)
|
||||||
* \param Process Pointer to a process.
|
* \param Process Pointer to a process.
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
KdbSymFreeProcessSymbols(IN PEPROCESS Process)
|
KdbSymFreeProcessSymbols(
|
||||||
|
IN PEPROCESS Process)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY CurrentEntry;
|
PLIST_ENTRY CurrentEntry;
|
||||||
PLDR_DATA_TABLE_ENTRY Current;
|
PLDR_DATA_TABLE_ENTRY Current;
|
||||||
PEPROCESS CurrentProcess;
|
PEPROCESS CurrentProcess;
|
||||||
PPEB Peb;
|
PPEB Peb;
|
||||||
|
|
||||||
CurrentProcess = PsGetCurrentProcess();
|
CurrentProcess = PsGetCurrentProcess();
|
||||||
if (CurrentProcess != Process)
|
if (CurrentProcess != Process)
|
||||||
{
|
KeAttachProcess(&Process->Pcb);
|
||||||
KeAttachProcess(&Process->Pcb);
|
|
||||||
}
|
|
||||||
Peb = Process->Peb;
|
|
||||||
ASSERT(Peb);
|
|
||||||
ASSERT(Peb->Ldr);
|
|
||||||
|
|
||||||
CurrentEntry = Peb->Ldr->InLoadOrderModuleList.Flink;
|
Peb = Process->Peb;
|
||||||
while (CurrentEntry != &Peb->Ldr->InLoadOrderModuleList &&
|
ASSERT(Peb);
|
||||||
CurrentEntry != NULL)
|
ASSERT(Peb->Ldr);
|
||||||
|
|
||||||
|
CurrentEntry = Peb->Ldr->InLoadOrderModuleList.Flink;
|
||||||
|
while (CurrentEntry != &Peb->Ldr->InLoadOrderModuleList && CurrentEntry)
|
||||||
{
|
{
|
||||||
Current = CONTAINING_RECORD(CurrentEntry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
Current = CONTAINING_RECORD(CurrentEntry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
|
||||||
|
KdbpSymUnloadModuleSymbols(Current->PatchInformation);
|
||||||
|
|
||||||
KdbpSymUnloadModuleSymbols(Current->PatchInformation);
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
|
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
|
||||||
}
|
}
|
||||||
if (CurrentProcess != Process)
|
|
||||||
{
|
if (CurrentProcess != Process)
|
||||||
KeDetachProcess();
|
KeDetachProcess();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Load symbol info for a driver.
|
/*! \brief Load symbol info for a driver.
|
||||||
|
@ -568,15 +566,16 @@ KdbSymFreeProcessSymbols(IN PEPROCESS Process)
|
||||||
* \param Module Pointer to the driver LDR_DATA_TABLE_ENTRY.
|
* \param Module Pointer to the driver LDR_DATA_TABLE_ENTRY.
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
KdbSymLoadDriverSymbols(IN PUNICODE_STRING Filename,
|
KdbSymLoadDriverSymbols(
|
||||||
IN PLDR_DATA_TABLE_ENTRY Module)
|
IN PUNICODE_STRING Filename,
|
||||||
|
IN PLDR_DATA_TABLE_ENTRY Module)
|
||||||
{
|
{
|
||||||
/* Load symbols for the image if available */
|
/* Load symbols for the image if available */
|
||||||
DPRINT("Loading driver %wZ symbols (driver @ %08x)\n", Filename, Module->DllBase);
|
DPRINT("Loading driver %wZ symbols (driver @ %08x)\n", Filename, Module->DllBase);
|
||||||
|
|
||||||
Module->PatchInformation = NULL;
|
Module->PatchInformation = NULL;
|
||||||
|
|
||||||
KdbpSymLoadModuleSymbols(Filename, (PROSSYM_INFO*)&Module->PatchInformation);
|
KdbpSymLoadModuleSymbols(Filename, (PROSSYM_INFO*)&Module->PatchInformation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Unloads symbol info for a driver.
|
/*! \brief Unloads symbol info for a driver.
|
||||||
|
@ -584,15 +583,18 @@ KdbSymLoadDriverSymbols(IN PUNICODE_STRING Filename,
|
||||||
* \param ModuleObject Pointer to the driver LDR_DATA_TABLE_ENTRY.
|
* \param ModuleObject Pointer to the driver LDR_DATA_TABLE_ENTRY.
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
KdbSymUnloadDriverSymbols(IN PLDR_DATA_TABLE_ENTRY ModuleObject)
|
KdbSymUnloadDriverSymbols(
|
||||||
|
IN PLDR_DATA_TABLE_ENTRY ModuleObject)
|
||||||
{
|
{
|
||||||
/* Unload symbols for module if available */
|
/* Unload symbols for module if available */
|
||||||
KdbpSymUnloadModuleSymbols(ModuleObject->PatchInformation);
|
KdbpSymUnloadModuleSymbols(ModuleObject->PatchInformation);
|
||||||
ModuleObject->PatchInformation = NULL;
|
ModuleObject->PatchInformation = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
KdbSymProcessSymbols(IN PANSI_STRING AnsiFileName, IN PKD_SYMBOLS_INFO SymbolInfo)
|
KdbSymProcessSymbols(
|
||||||
|
IN PANSI_STRING AnsiFileName,
|
||||||
|
IN PKD_SYMBOLS_INFO SymbolInfo)
|
||||||
{
|
{
|
||||||
BOOLEAN Found = FALSE;
|
BOOLEAN Found = FALSE;
|
||||||
PLIST_ENTRY ListHead, NextEntry;
|
PLIST_ENTRY ListHead, NextEntry;
|
||||||
|
@ -635,10 +637,8 @@ KdbSymProcessSymbols(IN PANSI_STRING AnsiFileName, IN PKD_SYMBOLS_INFO SymbolInf
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove symbol info if it already exists */
|
/* Remove symbol info if it already exists */
|
||||||
if (LdrEntry->PatchInformation != NULL)
|
if (LdrEntry->PatchInformation)
|
||||||
{
|
|
||||||
KdbpSymRemoveCachedFile(LdrEntry->PatchInformation);
|
KdbpSymRemoveCachedFile(LdrEntry->PatchInformation);
|
||||||
}
|
|
||||||
|
|
||||||
/* Load new symbol information */
|
/* Load new symbol information */
|
||||||
if (! RosSymCreateFromMem(LdrEntry->DllBase,
|
if (! RosSymCreateFromMem(LdrEntry->DllBase,
|
||||||
|
@ -667,7 +667,9 @@ KdbSymProcessSymbols(IN PANSI_STRING AnsiFileName, IN PKD_SYMBOLS_INFO SymbolInf
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdbDebugPrint(PCH Message, ULONG Length)
|
KdbDebugPrint(
|
||||||
|
PCH Message,
|
||||||
|
ULONG Length)
|
||||||
{
|
{
|
||||||
/* Nothing here */
|
/* Nothing here */
|
||||||
}
|
}
|
||||||
|
@ -680,8 +682,9 @@ KdbDebugPrint(PCH Message, ULONG Length)
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdbInitialize(PKD_DISPATCH_TABLE DispatchTable,
|
KdbInitialize(
|
||||||
ULONG BootPhase)
|
PKD_DISPATCH_TABLE DispatchTable,
|
||||||
|
ULONG BootPhase)
|
||||||
{
|
{
|
||||||
PCHAR p1, p2;
|
PCHAR p1, p2;
|
||||||
SHORT Found = FALSE;
|
SHORT Found = FALSE;
|
||||||
|
@ -785,7 +788,7 @@ KdbInitialize(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
SymbolsInfo.SizeOfImage = DataTableEntry->SizeOfImage;
|
SymbolsInfo.SizeOfImage = DataTableEntry->SizeOfImage;
|
||||||
|
|
||||||
KdbSymProcessSymbols(NULL, &SymbolsInfo);
|
KdbSymProcessSymbols(NULL, &SymbolsInfo);
|
||||||
KdbpSymbolsInitialized = TRUE;
|
KdbpSymbolsInitialized = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue