Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Thiago Jung Bauermann <bauerman@br.ibm.com>,
	       Pedro Alves <pedro@codesourcery.com>,
	gdb-patches@sourceware.org
Subject: [patch] Renaming: {insert,remove} += _location  [Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops]
Date: Wed, 17 Nov 2010 03:47:00 -0000	[thread overview]
Message-ID: <20101117034707.GB12159@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20101116185101.GA32061@host0.dyn.jankratochvil.net>

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  <jan.kratochvil@redhat.com>

	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.  */


  reply	other threads:[~2010-11-17  3:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 19:41 [patch 1/2] Convert hardware watchpoints to use breakpoint_ops Thiago Jung Bauermann
2010-10-07 14:47 ` Thiago Jung Bauermann
2010-10-16 17:43 ` Pedro Alves
2010-10-20  0:31   ` Thiago Jung Bauermann
2010-11-04 21:17     ` Thiago Jung Bauermann
2010-11-08 18:43     ` Joel Brobecker
2010-11-08 21:39       ` Thiago Jung Bauermann
2010-11-15 22:23     ` Joel Brobecker
2010-11-16 19:03       ` Thiago Jung Bauermann
2010-11-18 17:18         ` Joel Brobecker
2010-11-19 20:10           ` Thiago Jung Bauermann
2010-12-23 19:06             ` Thiago Jung Bauermann
2011-01-11 19:31               ` Thiago Jung Bauermann
2011-04-29 15:51                 ` "Cannot remove breakpoints because program is no longer writable" & catchpoints (was: Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops) Pedro Alves
2010-11-16  4:06     ` [patch 1/2] Convert hardware watchpoints to use breakpoint_ops Jan Kratochvil
2010-11-16  8:07       ` Joel Brobecker
2010-11-16 18:51         ` Jan Kratochvil
2010-11-17  3:47           ` Jan Kratochvil [this message]
2010-11-18 17:13             ` [patch] Renaming: {insert,remove} += _location [Re: [patch 1/2] Convert hardware watchpoints to use breakpoint_ops] Joel Brobecker
     [not found]           ` <20101117034556.GA12159@host0.dyn.jankratochvil.net>
2010-11-18 17:15             ` [patch] renaming: bp_location: b->bl &co. " Joel Brobecker
2010-12-23 18:50             ` Thiago Jung Bauermann
2010-12-24  5:14               ` Joel Brobecker
2010-12-27 20:04                 ` Thiago Jung Bauermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101117034707.GB12159@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=bauerman@br.ibm.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox