From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42991 invoked by alias); 11 Mar 2015 18:18:24 -0000 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 Received: (qmail 42981 invoked by uid 89); 11 Mar 2015 18:18:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 11 Mar 2015 18:18:23 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2BIIH3D016538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Mar 2015 14:18:20 -0400 Received: from localhost (dhcp-10-15-16-169.yyz.redhat.com [10.15.16.169]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2BIEgE1022811 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 11 Mar 2015 14:14:43 -0400 From: Sergio Durigan Junior To: Yao Qi Cc: GDB Patches Subject: Re: [PATCH 1/2] Implement breakpoint_find_if References: <1426030105-15485-1-git-send-email-sergiodj@redhat.com> <1426030105-15485-2-git-send-email-sergiodj@redhat.com> <86mw3jhj78.fsf@gmail.com> X-URL: http://blog.sergiodj.net Date: Wed, 11 Mar 2015 18:18:00 -0000 In-Reply-To: <86mw3jhj78.fsf@gmail.com> (Yao Qi's message of "Wed, 11 Mar 2015 11:22:51 +0000") Message-ID: <87sidbqu3x.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00313.txt.bz2 On Wednesday, March 11 2015, Yao Qi wrote: > Sergio Durigan Junior writes: > >> My first thought was to share the ALL_BREAKPOINTS* macros on >> gdb/breakpoint.h, but they use a global variable local to >> gdb/breakpoint.c, and I did not want to share that variable. So, in >> order to keep the minimal separation, I decided to implement this >> way of iterating through the existing 'struct breakpoint *'. > > Yeah, I agree that we should keep these variables private. > >> >> This function was based on BFD's bfd_sections_find_if. If the >> user-provided function returns 0, the iteration proceeds. Otherwise, >> the iteration stops and the function returns the 'struct breakpoint *' >> that is being processed. This means that the return value of this >> function can be either NULL or a pointer to a 'struct breakpoint'. > > This is fine by me. breakpoint_find_if can be more widely used so that > some other code in breakpoint.c can be moved out. Thanks, Yao. Pushed: Cheers, -- Sergio GPG key ID: 0x65FC5E36 Please send encrypted e-mail if possible http://sergiodj.net/