[PATCH 20/23] Momentary breakpoints should have no breakpoint number
Pedro Alves
pedro@palves.net
Mon May 16 18:40:27 GMT 2022
Momentary breakpoints have no breakpoint number, their breakpoint
number should be always 0, to avoid constantly incrementing (or
decrementing) the internal breakpoint count.
Indeed, set_momentary_breakpoint installs the created breakpoint
without a number.
However, momentary_breakpoint_from_master incorrectly gives an
internal breakpoint number to the new breakpoint. This commit fixes
that.
Change-Id: Iedcae5432cdf232db9e9a6e1a646d358abd34f95
---
gdb/breakpoint.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0d239f50fcc..4f664cbd7aa 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7945,7 +7945,6 @@ momentary_breakpoint_from_master (struct breakpoint *orig,
copy->enable_state = bp_enabled;
copy->disposition = disp_donttouch;
- copy->number = internal_breakpoint_number--;
breakpoint *b = add_to_breakpoint_chain (std::move (copy));
update_global_location_list_nothrow (UGLL_DONT_INSERT);
--
2.36.0
More information about the Gdb-patches
mailing list