[PATCH] Permanent breakpoints degrade to normal breakpoints on enable

Luis Machado lgustavo@codesourcery.com
Fri Oct 18 14:53:00 GMT 2013


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



More information about the Gdb-patches mailing list