From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18557 invoked by alias); 1 Jan 2007 14:12:37 -0000 Received: (qmail 18549 invoked by uid 22791); 1 Jan 2007 14:12:36 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 01 Jan 2007 14:12:30 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 46AC248CC2E for ; Mon, 1 Jan 2007 09:12:28 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17491-01-5 for ; Mon, 1 Jan 2007 09:12:28 -0500 (EST) Received: from takamaka.act-europe.fr (AStDenis-105-1-75-95.w80-8.abo.wanadoo.fr [80.8.212.95]) by nile.gnat.com (Postfix) with ESMTP id 6154648CBDF for ; Mon, 1 Jan 2007 09:12:27 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id BA2AF34C099; Mon, 1 Jan 2007 18:13:14 +0400 (RET) Date: Mon, 01 Jan 2007 14:12:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [commit] (was: "Re: Two identical "else if" blocks ?") Message-ID: <20070101141314.GB17211@adacore.com> References: <20070101035248.GE3428@adacore.com> <20070101040118.GA2035@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <20070101040118.GA2035@nevyn.them.org> User-Agent: Mutt/1.4.2.2i 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: 2007-01/txt/msg00021.txt.bz2 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 554 > > It looks like the two blocks are completely identical, and we should > > be able to remove one of them. Should I perhaps test what happens > > when I delete, say, the first one? > > They're not 100% the same (there's an extra b->inserted check) so I'd > recommend deleting the second one, since it's dead code. Argh! I knew I had a blind spot :-/. I've checked the following change in after having tested in on x86-linux. 2006-01-01 Joel Brobecker * breakpoint.c (remove_breakpoint): Remove dead code. -- Joel --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dead.diff" Content-length: 753 Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.234 diff -u -p -r1.234 breakpoint.c --- breakpoint.c 18 Dec 2006 22:10:13 -0000 1.234 +++ breakpoint.c 1 Jan 2007 06:05:33 -0000 @@ -1637,17 +1637,6 @@ remove_breakpoint (struct bp_location *b return val; b->inserted = (is == mark_inserted); } - else if (ep_is_exception_catchpoint (b->owner) - && b->inserted /* sometimes previous insert doesn't happen */ - && breakpoint_enabled (b->owner) - && !b->duplicate) - { - val = target_remove_breakpoint (&b->target_info); - if (val) - return val; - - b->inserted = (is == mark_inserted); - } return 0; } --KsGdsel6WgEHnImy--