aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2021-08-16 14:44:20 +0200
committerSimon Marchi <simon.marchi@polymtl.ca>2021-08-16 11:10:19 -0400
commitbd7ccaa983158e789e305f4baae245ee4975516f (patch)
treed5358844ea8df96dc4d8a1b6a2432ce881037a29 /gdb/breakpoint.c
parenteb09df162bafa67abee713be594a99bd20bd6825 (diff)
downloadgdb-bd7ccaa983158e789e305f4baae245ee4975516f.zip
gdb-bd7ccaa983158e789e305f4baae245ee4975516f.tar.gz
gdb-bd7ccaa983158e789e305f4baae245ee4975516f.tar.bz2
Notify observer of breakpoint auto-disabling
As breakpoint_modified observer is currently notified upon breakpoint stop before handling auto-disabling when enable count is reached, the observer is never notified of the disabling. The problem affects: - The MI interpreter enabled= value when reporting =breakpoint-modified - A Python event handler for breakpoint_modified using the "enabled" member of its parameter - insight: breakpoint GUI window is not properly updated upon auto-disable This patch moves the observer notification after the auto-disabling code and implements corresponding tests for the MI and Python cases. Fixes https://sourceware.org/bugzilla/show_bug.cgi?id=23336 Change-Id: I0c50df4789334071e5390cb46b3ca0d4a7f83c61
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 89af44e..feca224 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5491,7 +5491,6 @@ bpstat_stop_status (const address_space *aspace,
if (bs->stop)
{
++(b->hit_count);
- gdb::observers::breakpoint_modified.notify (b);
/* We will stop here. */
if (b->disposition == disp_disable)
@@ -5501,6 +5500,7 @@ bpstat_stop_status (const address_space *aspace,
b->enable_state = bp_disabled;
removed_any = 1;
}
+ gdb::observers::breakpoint_modified.notify (b);
if (b->silent)
bs->print = 0;
bs->commands = b->commands;