Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Always use breakpoint_enabled in breakpoint.c
@ 2008-07-31 12:17 Phil Muldoon
  2008-08-05 23:35 ` reping: " Phil Muldoon
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Muldoon @ 2008-07-31 12:17 UTC (permalink / raw)
  To: gdb-patches

While stepping though breakpoint.c, I noticed two trivial areas of 
breakpoint checking that were not using the breakpoint_enabled function. 
Change to consistently use the breakpoint_enabled function over directly 
checking the breakpoint->enable_state.

2008-07-31  Phil Muldoon  <pmuldoon@redhat.com>

    * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled().
    (insert_breakpoint_locations): Likewise.


Index: gdb/breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.338
diff -u -r1.338 breakpoint.c
--- gdb/breakpoint.c    28 Jul 2008 17:53:52 -0000    1.338
+++ gdb/breakpoint.c    31 Jul 2008 12:14:22 -0000
@@ -1320,7 +1320,7 @@
       if (!is_hardware_watchpoint (bpt))
     continue;
 
-      if (bpt->enable_state != bp_enabled)
+      if (!breakpoint_enabled (bpt))
     continue;
 
       if (bpt->disposition == disp_del_at_next_stop)
@@ -4768,7 +4768,7 @@
 
   ALL_BREAKPOINTS (b)
   {
-    if (b->type == bp_hardware_breakpoint && b->enable_state == bp_enabled)
+    if (b->type == bp_hardware_breakpoint && breakpoint_enabled (b))
       i++;
   }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* reping: PATCH: Always use breakpoint_enabled in breakpoint.c
  2008-07-31 12:17 PATCH: Always use breakpoint_enabled in breakpoint.c Phil Muldoon
@ 2008-08-05 23:35 ` Phil Muldoon
  2008-08-05 23:47   ` Stan Shebs
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Muldoon @ 2008-08-05 23:35 UTC (permalink / raw)
  To: gdb-patches

Re-ping on this. It's been about a week, and no comment - negative, 
positive or otherwise. Are patches like these useful?

Thanks

Phil

Phil Muldoon wrote:
> While stepping though breakpoint.c, I noticed two trivial areas of 
> breakpoint checking that were not using the breakpoint_enabled 
> function. Change to consistently use the breakpoint_enabled function 
> over directly checking the breakpoint->enable_state.
>
> 2008-07-31  Phil Muldoon  <pmuldoon@redhat.com>
>
>    * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled().
>    (insert_breakpoint_locations): Likewise.
>
>
> Index: gdb/breakpoint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/breakpoint.c,v
> retrieving revision 1.338
> diff -u -r1.338 breakpoint.c
> --- gdb/breakpoint.c    28 Jul 2008 17:53:52 -0000    1.338
> +++ gdb/breakpoint.c    31 Jul 2008 12:14:22 -0000
> @@ -1320,7 +1320,7 @@
>       if (!is_hardware_watchpoint (bpt))
>     continue;
>
> -      if (bpt->enable_state != bp_enabled)
> +      if (!breakpoint_enabled (bpt))
>     continue;
>
>       if (bpt->disposition == disp_del_at_next_stop)
> @@ -4768,7 +4768,7 @@
>
>   ALL_BREAKPOINTS (b)
>   {
> -    if (b->type == bp_hardware_breakpoint && b->enable_state == 
> bp_enabled)
> +    if (b->type == bp_hardware_breakpoint && breakpoint_enabled (b))
>       i++;
>   }
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: reping: PATCH: Always use breakpoint_enabled in breakpoint.c
  2008-08-05 23:35 ` reping: " Phil Muldoon
@ 2008-08-05 23:47   ` Stan Shebs
  0 siblings, 0 replies; 3+ messages in thread
From: Stan Shebs @ 2008-08-05 23:47 UTC (permalink / raw)
  To: Phil Muldoon; +Cc: gdb-patches

Phil Muldoon wrote:
> Re-ping on this. It's been about a week, and no comment - negative, 
> positive or otherwise. Are patches like these useful?
I thought it was already OKed! In any case, yes.  You should go ahead 
and get a sourceware account, btw.

Stan
>
> Thanks
>
> Phil
>
> Phil Muldoon wrote:
>> While stepping though breakpoint.c, I noticed two trivial areas of 
>> breakpoint checking that were not using the breakpoint_enabled 
>> function. Change to consistently use the breakpoint_enabled function 
>> over directly checking the breakpoint->enable_state.
>>
>> 2008-07-31  Phil Muldoon  <pmuldoon@redhat.com>
>>
>>    * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled().
>>    (insert_breakpoint_locations): Likewise.
>>
>>
>> Index: gdb/breakpoint.c
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/breakpoint.c,v
>> retrieving revision 1.338
>> diff -u -r1.338 breakpoint.c
>> --- gdb/breakpoint.c    28 Jul 2008 17:53:52 -0000    1.338
>> +++ gdb/breakpoint.c    31 Jul 2008 12:14:22 -0000
>> @@ -1320,7 +1320,7 @@
>>       if (!is_hardware_watchpoint (bpt))
>>     continue;
>>
>> -      if (bpt->enable_state != bp_enabled)
>> +      if (!breakpoint_enabled (bpt))
>>     continue;
>>
>>       if (bpt->disposition == disp_del_at_next_stop)
>> @@ -4768,7 +4768,7 @@
>>
>>   ALL_BREAKPOINTS (b)
>>   {
>> -    if (b->type == bp_hardware_breakpoint && b->enable_state == 
>> bp_enabled)
>> +    if (b->type == bp_hardware_breakpoint && breakpoint_enabled (b))
>>       i++;
>>   }
>>
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-05 23:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 12:17 PATCH: Always use breakpoint_enabled in breakpoint.c Phil Muldoon
2008-08-05 23:35 ` reping: " Phil Muldoon
2008-08-05 23:47   ` Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox