Skip to content

Commit

Permalink
Ensure that we clear any debug registers not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
TimMisiak committed Sep 24, 2023
1 parent 50dd1f2 commit f893d9a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/breakpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ impl BreakpointManager {
_ => (),
}
} else {
// We'll assume that we own all breakpoints. This will cause problems with programs that expect to control their own debug registers.
// As a result, we'll disable any breakpoints that we aren't using.
set_bits(&mut ctx.context.Dr7, 0, DR7_LE_BIT[idx], 1);
break;
}
}
Expand Down

0 comments on commit f893d9a

Please sign in to comment.