mirror of
https://github.com/reactos/reactos.git
synced 2025-06-06 01:40:36 +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 Resume = FALSE;
|
||||||
BOOLEAN EnterConditionMet = TRUE;
|
BOOLEAN EnterConditionMet = TRUE;
|
||||||
ULONG OldEflags;
|
ULONG OldEflags;
|
||||||
|
KIRQL OldIrql;
|
||||||
NTSTATUS ExceptionCode;
|
NTSTATUS ExceptionCode;
|
||||||
|
|
||||||
ExceptionCode = (ExceptionRecord ? ExceptionRecord->ExceptionCode : STATUS_BREAKPOINT);
|
ExceptionCode = (ExceptionRecord ? ExceptionRecord->ExceptionCode : STATUS_BREAKPOINT);
|
||||||
|
@ -1607,6 +1608,11 @@ KdbEnterDebuggerException(
|
||||||
OldEflags = __readeflags();
|
OldEflags = __readeflags();
|
||||||
_disable();
|
_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. */
|
/* Exception inside the debugger? Game over. */
|
||||||
if (InterlockedIncrement(&KdbEntryCount) > 1)
|
if (InterlockedIncrement(&KdbEntryCount) > 1)
|
||||||
{
|
{
|
||||||
|
@ -1646,6 +1652,9 @@ KdbEnterDebuggerException(
|
||||||
/* Decrement the entry count */
|
/* Decrement the entry count */
|
||||||
InterlockedDecrement(&KdbEntryCount);
|
InterlockedDecrement(&KdbEntryCount);
|
||||||
|
|
||||||
|
/* HACK: Raise back to old IRWL */
|
||||||
|
KeRaiseIrql(OldIrql, &OldIrql);
|
||||||
|
|
||||||
/* Leave critical section */
|
/* Leave critical section */
|
||||||
__writeeflags(OldEflags);
|
__writeeflags(OldEflags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue