Patch: Little improvement to delete breakpoint command
Markus Deuling
deuling@de.ibm.com
Tue Nov 28 17:35:00 GMT 2006
Hello,
Daniel Jacobowitz schrieb:
> On Tue, Nov 28, 2006 at 06:21:39PM +0100, Markus Deuling wrote:
>> Hello,
>>
>> this little patch adds a break to the loop that is looking for
>> breakpoints to delete in delete_command(). I think it is only necessary
>> to find one breakpoint, there is no need to iterate further if found one.
>>
>> ===================================================================
>> --- breakpoint.old 2006-11-28 17:08:11.000000000 +0100
>> +++ breakpoint.c 2006-11-28 17:42:15.000000000 +0100
>> @@ -6960,6 +6960,7 @@
>> b->type != bp_overlay_event &&
>> b->number >= 0)
>> breaks_to_delete = 1;
>> + break;
>> }
>>
>> /* Ask user only if there are some breakpoints to delete. */
>>
>
> Did you test this? I'm pretty sure you're missing braces.
>
I did test it and it works for me.
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;
}
Regards,
Markus
More information about the Gdb-patches
mailing list