From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2765 invoked by alias); 28 Nov 2006 17:42:57 -0000 Received: (qmail 2750 invoked by uid 22791); 28 Nov 2006 17:42:55 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 28 Nov 2006 17:42:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1Gp6yk-0006Hh-A1; Tue, 28 Nov 2006 12:42:46 -0500 Date: Tue, 28 Nov 2006 17:42:00 -0000 From: Daniel Jacobowitz To: Markus Deuling Cc: GDB Subject: Re: Patch: Little improvement to delete breakpoint command Message-ID: <20061128174246.GA23830@nevyn.them.org> Mail-Followup-To: Markus Deuling , GDB References: <456C7023.4050204@de.ibm.com> <20061128172458.GH21834@nevyn.them.org> <456C7350.7080002@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <456C7350.7080002@de.ibm.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00334.txt.bz2 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