This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] breakpoint.c, enable_command, missing break statement.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>
- Date: Fri, 4 Mar 2011 19:28:03 +0000
- Subject: Re: [RFA] breakpoint.c, enable_command, missing break statement.
- References: <4D713431.3060907@vmware.com>
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. 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.
--
Pedro Alves