This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Permanent breakpoints degrade to normal breakpoints on enable
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 18 Oct 2013 11:52:55 -0300
- Subject: Re: [PATCH] Permanent breakpoints degrade to normal breakpoints on enable
- Authentication-results: sourceware.org; auth=none
- References: <52614A15 dot 7070301 at broadcom dot com>
- Reply-to: lgustavo at codesourcery dot com
Hi,
On 10/18/2013 11:47 AM, Andrew Burgess wrote:
This patch:
https://sourceware.org/ml/gdb-patches/2012-01/msg00964.html
introduced what I believe is a stray line that causes permanent
breakpoints to become normal breakpoints if the user ever tries
to "enable" the permanent breakpoint.
I've removed the extra line and written a test to cover this case.
OK to apply?
Andrew
gdb/ChangeLog
2013-10-18 Andrew Burgess <aburgess@broadcom.com>
* breakpoint.c (enable_breakpoint_disp): Remove setting of
enabled_state for permanent breakpoints.
gdb/testsuite/ChangeLog
2013-10-18 Andrew Burgess <aburgess@broadcom.com>
* gdb.arch/i386-permbkpt.exp: Extend the existing tests, and add
more tests.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 911f7b5..53ece71 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -14666,8 +14666,6 @@ enable_breakpoint_disp (struct breakpoint *bpt, enum bpdisp disposition,
if (bpt->enable_state != bp_permanent)
bpt->enable_state = bp_enabled;
- bpt->enable_state = bp_enabled;
-
/* Mark breakpoint locations modified. */
mark_breakpoint_modified (bpt);
It does look bogus. The fix makes sense to me.
Luis