Skip to content

breakpoint: hit count is double-incremented when both on_hit and should_break_with_context are called #739

@Timi16

Description

@Timi16

File: src/debugger/breakpoint.rs

Both on_hit and should_break_with_context call bp.increment_hit(). If a caller invokes both methods for the same hit event (which is easy given the overlapping APIs), the hit count advances by 2 instead of 1, breaking ==N and %N==0 hit conditions.

Proposal: Consolidate hit counting into a single internal method and deprecate/remove the duplicate entry point.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions