From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29365 invoked by alias); 1 Aug 2011 18:34:57 -0000 Received: (qmail 29250 invoked by uid 22791); 1 Aug 2011 18:34:56 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e24smtp02.br.ibm.com (HELO e24smtp02.br.ibm.com) (32.104.18.86) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Aug 2011 18:34:36 +0000 Received: from mailhub1.br.ibm.com (mailhub1.br.ibm.com [9.18.232.109]) by e24smtp02.br.ibm.com (8.14.4/8.13.1) with ESMTP id p71JlUkh018436 for ; Mon, 1 Aug 2011 16:47:30 -0300 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p71IapGa1515752 for ; Mon, 1 Aug 2011 15:36:57 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p71AYKD4019457 for ; Mon, 1 Aug 2011 07:34:20 -0300 Received: from [9.12.226.56] ([9.12.226.56]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p71AYImW019445; Mon, 1 Aug 2011 07:34:19 -0300 Subject: Re: [obvious] Remove unused argument in insert_bp_location From: Thiago Jung Bauermann To: Tom Tromey Cc: gdb-patches ml In-Reply-To: References: <1312144543.13977.3.camel@hactar> Content-Type: text/plain; charset="UTF-8" Date: Mon, 01 Aug 2011 18:34:00 -0000 Message-ID: <1312223647.2658.1.camel@hactar> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: 2011-08/txt/msg00017.txt.bz2 On Mon, 2011-08-01 at 08:41 -0600, Tom Tromey wrote: > >>>>> "Thiago" == Thiago Jung Bauermann writes: > > Thiago> I noticed that disabled_breakpoints is not used. It's both an input and > Thiago> output parameter. All callers set it to zero, and none of them checks > Thiago> its value on return. > > Thiago> 2011-07-31 Thiago Jung Bauermann > Thiago> * breakpoint.c (insert_bp_location): Remove disabled_breaks > Thiago> argument. Update callers. > > I don't think this patch is really equivalent to the previous code. > > To me it seems that *disabled_breaks was being used as a persistent flag. > That is, the caller doesn't check its value, but subsequent calls to > insert_bp_location do -- the value is not reset in the ALL_BP_LOCATIONS > loop in insert_breakpoint_locations. Oh, you're right. It prevents those warnings from being shown for every bp_location in a shared library. I'll revert the patch and extend the documentation of insert_bp_location. That's one of the problems of hacking on a Sunday. Thanks for checking. -- []'s Thiago Jung Bauermann IBM Linux Technology Center