From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21677 invoked by alias); 17 Nov 2010 03:47:54 -0000 Received: (qmail 21668 invoked by uid 22791); 17 Nov 2010 03:47:53 -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; Wed, 17 Nov 2010 03:47:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAH3lEq5031782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Nov 2010 22:47:14 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oAH3lAFC027063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Nov 2010 22:47:13 -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 oAH3l8GJ025351; Wed, 17 Nov 2010 04:47:08 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oAH3l7aC025350; Wed, 17 Nov 2010 04:47:07 +0100 Date: Wed, 17 Nov 2010 03:47:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Thiago Jung Bauermann , Pedro Alves , gdb-patches@sourceware.org Subject: [patch] Renaming: {insert,remove} += _location [Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops] Message-ID: <20101117034707.GB12159@host0.dyn.jankratochvil.net> References: <1282074071.2606.702.camel@hactar> <201010161843.43062.pedro@codesourcery.com> <1287534691.2686.17.camel@hactar> <20101116040625.GB19243@host0.dyn.jankratochvil.net> <20101116080721.GC4434@adacore.com> <20101116185101.GA32061@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101116185101.GA32061@host0.dyn.jankratochvil.net> 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/msg00223.txt.bz2 On Tue, 16 Nov 2010 19:51:01 +0100, Jan Kratochvil wrote: > On Tue, 16 Nov 2010 09:07:21 +0100, Joel Brobecker wrote: > > How about doing such a rename as a patch on its own? > > OK, going to send one today. I will check it in after the Thiago's check-in. Regards, Jan gdb/ 2010-11-17 Jan Kratochvil Code cleanup - renaming. * breakpoint.c (insert_bp_location): Use the new name breakpoint_ops->insert_location. (remove_breakpoint_1): Use the new name breakpoint_ops->remove_location. * breakpoint.h (struct breakpoint_ops): Rename insert to insert_location and remove to remove_location. --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1757,7 +1757,7 @@ Note: automatically using hardware breakpoints for read-only addresses.\n")); watchpoints. It's not clear that it's necessary... */ && bl->owner->disposition != disp_del_at_next_stop) { - val = bl->owner->ops->insert (bl); + val = bl->owner->ops->insert_location (bl); /* If trying to set a read-watchpoint, and it turns out it's not supported, try emulating one with an access watchpoint. */ @@ -1784,7 +1784,7 @@ Note: automatically using hardware breakpoints for read-only addresses.\n")); if (val == 1) { bl->watchpoint_type = hw_access; - val = bl->owner->ops->insert (bl); + val = bl->owner->ops->insert_location (bl); if (val) /* Back to the original value. */ @@ -1797,9 +1797,10 @@ Note: automatically using hardware breakpoints for read-only addresses.\n")); else if (bl->owner->type == bp_catchpoint) { - gdb_assert (bl->owner->ops != NULL && bl->owner->ops->insert != NULL); + gdb_assert (bl->owner->ops != NULL + && bl->owner->ops->insert_location != NULL); - val = bl->owner->ops->insert (bl); + val = bl->owner->ops->insert_location (bl); if (val) { bl->owner->enable_state = bp_disabled; @@ -2478,7 +2479,7 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is) else if (bl->loc_type == bp_loc_hardware_watchpoint) { bl->inserted = (is == mark_inserted); - bl->owner->ops->remove (bl); + bl->owner->ops->remove_location (bl); /* Failure to remove any of the hardware watchpoints comes here. */ if ((is == mark_uninserted) && (bl->inserted)) @@ -2489,9 +2490,10 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is) && breakpoint_enabled (bl->owner) && !bl->duplicate) { - gdb_assert (bl->owner->ops != NULL && bl->owner->ops->remove != NULL); + gdb_assert (bl->owner->ops != NULL + && bl->owner->ops->remove_location != NULL); - val = bl->owner->ops->remove (bl); + val = bl->owner->ops->remove_location (bl); if (val) return val; --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -355,13 +355,13 @@ struct breakpoint_ops /* 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 *); + int (*insert_location) (struct bp_location *); /* Remove the breakpoint/catchpoint that was previously inserted 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 *); + int (*remove_location) (struct bp_location *); /* Return non-zero if the debugger should tell the user that this breakpoint was hit. */