public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Patch: [PR1689] Not set ignore count on deleted breakpoints
@ 2005-06-29  8:34 Jie Zhang
  0 siblings, 0 replies; only message in thread
From: Jie Zhang @ 2005-06-29  8:34 UTC (permalink / raw)
  To: gdb, gdb-patches, gdb-prs

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-29  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-29  8:34 Patch: [PR1689] Not set ignore count on deleted breakpoints Jie Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).