This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Permanent breakpoints degrade to normal breakpoints on enable


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]