[RFA] breakpoint.c, enable_command, missing break statement.

Michael Snyder msnyder@vmware.com
Fri Mar 4 19:58:00 GMT 2011


Pedro Alves wrote:
> On Friday 04 March 2011 18:49:21, Michael Snyder wrote:
>> I'm not entirely sure what to do with this one.
>>
>> It clearly falls through, and it works as is, so the least change
>> is just to comment it.
> 
> It looks irrelevant. 

It's always relevant to document a fall-through.

> The intent of the code is obviously
> to iterate over all breakpoints, or all kinds.  
> The "continue" is continuing the loop hidden in
> ALL_BREAKPOINTS at the next iteration.  But if you replace
> all the continue's with break's it will still work the same,
> because the "break" would break the the "switch", not the
> loop.  I think if you do that the code ends up simpler to
> read, with no magic.
> 

Agreed.  Extending the same fix to disable_command, and committing.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: break9.txt
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110304/e6c627a3/attachment.txt>


More information about the Gdb-patches mailing list