From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12757 invoked by alias); 16 Nov 2010 04:06:49 -0000 Received: (qmail 12747 invoked by uid 22791); 16 Nov 2010 04:06:48 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Nov 2010 04:06:44 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAG46ZdZ017751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Nov 2010 23:06:35 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oAG46U3H015433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 23:06:34 -0500 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oAG46Ro0020857; Tue, 16 Nov 2010 05:06:27 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAG46PEO020854; Tue, 16 Nov 2010 05:06:25 +0100 Date: Tue, 16 Nov 2010 04:06:00 -0000 From: Jan Kratochvil To: Thiago Jung Bauermann Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops Message-ID: <20101116040625.GB19243@host0.dyn.jankratochvil.net> References: <1282074071.2606.702.camel@hactar> <201010161843.43062.pedro@codesourcery.com> <1287534691.2686.17.camel@hactar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1287534691.2686.17.camel@hactar> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2010-11/txt/msg00194.txt.bz2 On Wed, 20 Oct 2010 02:31:31 +0200, Thiago Jung Bauermann wrote: > -static void > -insert_catch_fork (struct breakpoint *b) > +static int > +insert_catch_fork (struct bp_location *b) Such variables (across the whole patch) should be really renamed when changing its type. I understand there are already cases of such incorrect naming in GDB but we should not make it worse. Also were these functions intended per-breakpoint or per-bp_location? It looks to me currently they are used only for single-location breakpoint so no one knows. (I guess they were meant for breakpoint.) > -struct breakpoint_ops > +struct breakpoint_ops > { > - /* Insert the breakpoint or activate the catchpoint. Should raise > - an exception if the operation failed. */ > - void (*insert) (struct breakpoint *); > + /* Insert the breakpoint or watchpoint or activate the catchpoint. > + Return 0 for success, 1 if the breakpoint, watchpoint or catchpoint > + type is not supported, -1 for failure. */ > + int (*insert) (struct bp_location *); > > /* Remove the breakpoint/catchpoint that was previously inserted > - with the "insert" method above. Return non-zero if the operation > - succeeded. */ > - int (*remove) (struct breakpoint *); > + with the "insert" method above. Return 0 for success, 1 if the > + breakpoint, watchpoint or catchpoint type is not supported, > + -1 for failure. */ > + int (*remove) (struct bp_location *); At least rename it to insert_bploc (or insert_location etc.). This will need to be cleaned up with the regular breakpoints/watchpoints conversion to breakpoint_ops. Thanks, Jan