This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Patch: Little improvement to delete breakpoint command
On Tue, Nov 28, 2006 at 06:35:12PM +0100, Markus Deuling wrote:
> I did test it and it works for me.
Did you run the testsuite? Or experiment with any case that should set
breaks_to_delete but not for the most recent breakpoint?
> The braces are included in vanilla gdb-6.5. Without that "break" the
> braces are unnecessary. This is the original routine:
>
> ALL_BREAKPOINTS (b)
> {
> if (b->type != bp_call_dummy &&
> b->type != bp_shlib_event &&
> b->type != bp_thread_event &&
> b->type != bp_overlay_event &&
> b->number >= 0)
> breaks_to_delete = 1;
> }
Wrong braces. You've converted that to:
ALL_BREAKPOINTS (b)
{
if (b->type != bp_call_dummy &&
b->type != bp_shlib_event &&
b->type != bp_thread_event &&
b->type != bp_overlay_event &&
b->number >= 0)
breaks_to_delete = 1;
break;
}
Now do you see the problem? Remember, C is not whitespace sensitive.
--
Daniel Jacobowitz
CodeSourcery