mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
[KDBG]
Hackfix the problem with attaching to processes introduced in r44743, by lowering IRQL to passive level, although interrupts are off. Needed because KDBG calls pageable code. svn path=/trunk/; revision=44766
This commit is contained in:
parent
be29496e50
commit
c300719e77
1 changed files with 9 additions and 0 deletions
|
@ -1350,6 +1350,7 @@ KdbEnterDebuggerException(
|
|||
BOOLEAN Resume = FALSE;
|
||||
BOOLEAN EnterConditionMet = TRUE;
|
||||
ULONG OldEflags;
|
||||
KIRQL OldIrql;
|
||||
NTSTATUS ExceptionCode;
|
||||
|
||||
ExceptionCode = (ExceptionRecord ? ExceptionRecord->ExceptionCode : STATUS_BREAKPOINT);
|
||||
|
@ -1607,6 +1608,11 @@ KdbEnterDebuggerException(
|
|||
OldEflags = __readeflags();
|
||||
_disable();
|
||||
|
||||
/* HACK: Save the current IRQL and pretend we are at passive level,
|
||||
* although interrupts are off. Needed because KDBG calls pageable code. */
|
||||
OldIrql = KeGetCurrentIrql();
|
||||
KeLowerIrql(PASSIVE_LEVEL);
|
||||
|
||||
/* Exception inside the debugger? Game over. */
|
||||
if (InterlockedIncrement(&KdbEntryCount) > 1)
|
||||
{
|
||||
|
@ -1646,6 +1652,9 @@ KdbEnterDebuggerException(
|
|||
/* Decrement the entry count */
|
||||
InterlockedDecrement(&KdbEntryCount);
|
||||
|
||||
/* HACK: Raise back to old IRWL */
|
||||
KeRaiseIrql(OldIrql, &OldIrql);
|
||||
|
||||
/* Leave critical section */
|
||||
__writeeflags(OldEflags);
|
||||
|
||||
|
|
Loading…
Reference in a new issue