This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/gdb-7.12-branch] Simplify remove_breakpoint interface


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7c50accb20e77971c775fdb7f5f1bfa605397e80

commit 7c50accb20e77971c775fdb7f5f1bfa605397e80
Author: Pedro Alves <palves@redhat.com>
Date:   Wed Aug 10 23:06:01 2016 +0100

    Simplify remove_breakpoint interface
    
    All callers pass mark_uninserted, so there's no need for the 'is'
    parameter.
    
    gdb/ChangeLog:
    2016-08-10  Pedro Alves  <palves@redhat.com>
    
    	PR gdb/19187
    	* breakpoint.c (remove_breakpoint): Remove 'is' parameter and
    	always pass mark_uninserted to remove_breakpoint_1.
    	(insert_breakpoint_locations, remove_breakpoints)
    	(remove_breakpoints_pid, update_global_location_list): Update
    	callers.

Diff:
---
 gdb/ChangeLog    |  9 +++++++++
 gdb/breakpoint.c | 14 +++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 80c28c9..9dc3f4a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
 2016-08-10  Pedro Alves  <palves@redhat.com>
 
+	PR gdb/19187
+	* breakpoint.c (remove_breakpoint): Remove 'is' parameter and
+	always pass mark_uninserted to remove_breakpoint_1.
+	(insert_breakpoint_locations, remove_breakpoints)
+	(remove_breakpoints_pid, update_global_location_list): Update
+	callers.
+
+2016-08-10  Pedro Alves  <palves@redhat.com>
+
 	* common/signals-state-save-restore.c
 	(save_original_signals_state, restore_original_signals_state):
 	Wrap perror_with_name arguments with '()'.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index e4b62c7..a24eee1 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -201,7 +201,7 @@ typedef enum
   }
 insertion_state_t;
 
-static int remove_breakpoint (struct bp_location *, insertion_state_t);
+static int remove_breakpoint (struct bp_location *);
 static int remove_breakpoint_1 (struct bp_location *, insertion_state_t);
 
 static enum print_stop_action print_bp_stop_message (bpstat bs);
@@ -3189,7 +3189,7 @@ insert_breakpoint_locations (void)
 	{
 	  for (loc = bpt->loc; loc; loc = loc->next)
 	    if (loc->inserted)
-	      remove_breakpoint (loc, mark_uninserted);
+	      remove_breakpoint (loc);
 
 	  hw_breakpoint_error = 1;
 	  fprintf_unfiltered (tmp_error_stream,
@@ -3229,7 +3229,7 @@ remove_breakpoints (void)
   ALL_BP_LOCATIONS (bl, blp_tmp)
   {
     if (bl->inserted && !is_tracepoint (bl->owner))
-      val |= remove_breakpoint (bl, mark_uninserted);
+      val |= remove_breakpoint (bl);
   }
   return val;
 }
@@ -3274,7 +3274,7 @@ remove_breakpoints_pid (int pid)
 
     if (bl->inserted && !bl->target_info.persist)
       {
-	val = remove_breakpoint (bl, mark_uninserted);
+	val = remove_breakpoint (bl);
 	if (val != 0)
 	  return val;
       }
@@ -4088,7 +4088,7 @@ remove_breakpoint_1 (struct bp_location *bl, insertion_state_t is)
 }
 
 static int
-remove_breakpoint (struct bp_location *bl, insertion_state_t is)
+remove_breakpoint (struct bp_location *bl)
 {
   int ret;
   struct cleanup *old_chain;
@@ -4104,7 +4104,7 @@ remove_breakpoint (struct bp_location *bl, insertion_state_t is)
 
   switch_to_program_space_and_thread (bl->pspace);
 
-  ret = remove_breakpoint_1 (bl, is);
+  ret = remove_breakpoint_1 (bl, mark_uninserted);
 
   do_cleanups (old_chain);
   return ret;
@@ -12609,7 +12609,7 @@ update_global_location_list (enum ugll_insert_mode insert_mode)
 
 	  if (!keep_in_target)
 	    {
-	      if (remove_breakpoint (old_loc, mark_uninserted))
+	      if (remove_breakpoint (old_loc))
 		{
 		  /* This is just about all we can do.  We could keep
 		     this location on the global list, and try to


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]