This is the mail archive of the gdb@sources.redhat.com 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]

Patch: [PR1689] Not set ignore count on deleted breakpoints


This patch should fix PR1689. It does not set ignore count on deleted
breakpoints.

Tested on arm-elf target.

Is it OK?

Thanks,
Jie

2005-06-29  Jie Zhang  <jie.zhang@analog.com>

	* infcmd.c (continue_command): Not set ignore count on deleted
	breakpoints.

Index: gdb/infcmd.c
===================================================================
RCS file: /cvsroot/gcc3/binutils/binutils-2.15/gdb/infcmd.c,v
retrieving revision 1.1
diff -u -p -r1.1 infcmd.c
--- gdb/infcmd.c	26 Nov 2004 12:43:49 -0000	1.1
+++ gdb/infcmd.c	29 Jun 2005 00:16:09 -0000
@@ -543,22 +543,27 @@ continue_command (char *proc_count_exp, 
     {
       bpstat bs = stop_bpstat;
       int num = bpstat_num (&bs);
-      if (num == 0 && from_tty)
-	{
-	  printf_filtered
-	    ("Not stopped at any breakpoint; argument ignored.\n");
-	}
+      int stopped_at_no_breakpoint = 1;
       while (num != 0)
 	{
-	  set_ignore_count (num,
-			    parse_and_eval_long (proc_count_exp) - 1,
-			    from_tty);
-	  /* set_ignore_count prints a message ending with a period.
-	     So print two spaces before "Continuing.".  */
-	  if (from_tty)
-	    printf_filtered ("  ");
+	  if (num > 0)
+	    {
+	      set_ignore_count (num,
+				parse_and_eval_long (proc_count_exp) - 1,
+				from_tty);
+	      /* set_ignore_count prints a message ending with a period.
+		 So print two spaces before "Continuing.".  */
+	      if (from_tty)
+		printf_filtered ("  ");
+	      stopped_at_no_breakpoint = 0;
+	    }
 	  num = bpstat_num (&bs);
 	}
+      if (stopped_at_no_breakpoint && from_tty)
+	{
+	  printf_filtered
+	    ("Not stopped at any breakpoint; argument ignored.\n");
+	}
     }
 
   if (from_tty)


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