From ca5361525fd82b4cada093923d97c5e20680c680 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Fri, 21 Aug 2015 20:57:19 +0000 Subject: [PATCH] - Fix a "clever" check in KdpDeleteBreakpointRange that made the routine unable to delete more than one breakpoint in the specified range. svn path=/trunk/; revision=68790 --- reactos/ntoskrnl/kd64/kdbreak.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/kd64/kdbreak.c b/reactos/ntoskrnl/kd64/kdbreak.c index 6b3aa54f66f..a75fe57ddb2 100644 --- a/reactos/ntoskrnl/kd64/kdbreak.c +++ b/reactos/ntoskrnl/kd64/kdbreak.c @@ -206,7 +206,10 @@ KdpDeleteBreakpointRange(IN PVOID Base, IN PVOID Limit) { ULONG BpIndex; - BOOLEAN Return = FALSE; + BOOLEAN DeletedBreakpoints; + + /* Assume no breakpoints will be deleted */ + DeletedBreakpoints = FALSE; /* Loop the breakpoint table */ for (BpIndex = 0; BpIndex < KD_BREAKPOINT_MAX; BpIndex++) @@ -216,13 +219,13 @@ KdpDeleteBreakpointRange(IN PVOID Base, ((KdpBreakpointTable[BpIndex].Address >= Base) && (KdpBreakpointTable[BpIndex].Address <= Limit))) { - /* Delete it */ - Return = Return || KdpDeleteBreakpoint(BpIndex + 1); + /* Delete it, and remember if we succeeded at least once */ + if (KdpDeleteBreakpoint(BpIndex + 1)) DeletedBreakpoints = TRUE; } } - /* Return to caller */ - return Return; + /* Return whether we deleted anything */ + return DeletedBreakpoints; } VOID