Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [MI tracepoints 5/9] -break-passcount
@ 2010-03-14  8:56 Vladimir Prus
  2010-03-15 21:04 ` Tom Tromey
  0 siblings, 1 reply; 11+ messages in thread
From: Vladimir Prus @ 2010-03-14  8:56 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: Text/Plain, Size: 257 bytes --]


This patch introduces -break-passcount. This is of general utility, not
just for tracepoint and was missing for not good reason. This is MI-only
change, so just as RFC.

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@codesourcery.com
(650) 331-3385 x722

[-- Attachment #2: 5-break-passcount.diff --]
[-- Type: text/x-patch, Size: 2432 bytes --]

commit 14d3141d9af168e76ae58c54b6f9f03ad3f37ead
Author: vladimir <vladimir@e7755896-6108-0410-9592-8049d3e74e28>
Date:   Thu Aug 6 07:47:57 2009 +0000

    Implement -break-passcount.
    
    	* mi/mi-cmd-break.c (mi_cmd_break_passcount): New.
    	* mi/mi-cmds.c (mi_cmds): Register -break-passcount.
    	* mi/mi-cmds.h (mi_cmd_break_passcount): Declare.
    
    git-svn-id: svn+ssh://cugel//net/svn-internal/subversion/Repository/csl/gdb/branches/ericsson-tracing@257799 e7755896-6108-0410-9592-8049d3e74e28

diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 3e82b8f..bdbbe09 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -170,6 +170,31 @@ enum wp_type
   ACCESS_WP
 };
 
+void
+mi_cmd_break_passcount (char *command, char **argv, int argc)
+{
+  int n;
+  int p;
+  struct breakpoint *t;
+
+  if (argc != 2)
+    error (_("Usage: tracepoint-number passcount"));
+
+  n = atoi (argv[0]);
+  p = atoi (argv[1]);
+  t = get_tracepoint (n);
+
+  if (t)
+    {
+      t->pass_count = p;
+      observer_notify_tracepoint_modified (n);
+    }
+  else
+    {
+      error (_("Cound not find tracepoint %d"), n);
+    }
+}
+
 /* Insert a watchpoint. The type of watchpoint is specified by the
    first argument: 
    -break-watch <expr> --> insert a regular wp.  
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index c2183fb..6b260fc 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -43,6 +43,7 @@ struct mi_cmd mi_cmds[] =
   { "break-info", { "info break", 1 }, NULL },
   { "break-insert", { NULL, 0 }, mi_cmd_break_insert},
   { "break-list", { "info break", }, NULL },
+  { "break-passcount", { NULL, 0 }, mi_cmd_break_passcount},
   { "break-watch", { NULL, 0 }, mi_cmd_break_watch},
   { "data-disassemble", { NULL, 0 }, mi_cmd_disassemble},
   { "data-evaluate-expression", { NULL, 0 }, mi_cmd_data_evaluate_expression},
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 702dd9e..b5ff61f 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -39,6 +39,7 @@ typedef void (mi_cmd_argv_ftype) (char *command, char **argv, int argc);
 extern mi_cmd_argv_ftype mi_cmd_add_inferior;
 extern mi_cmd_argv_ftype mi_cmd_break_insert;
 extern mi_cmd_argv_ftype mi_cmd_break_commands;
+extern mi_cmd_argv_ftype mi_cmd_break_passcount;
 extern mi_cmd_argv_ftype mi_cmd_break_watch;
 extern mi_cmd_argv_ftype mi_cmd_disassemble;
 extern mi_cmd_argv_ftype mi_cmd_data_evaluate_expression;

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-03-16 18:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-14  8:56 [MI tracepoints 5/9] -break-passcount Vladimir Prus
2010-03-15 21:04 ` Tom Tromey
2010-03-16 12:13   ` Vladimir Prus
2010-03-16 15:37     ` Tom Tromey
2010-03-16 15:47       ` Vladimir Prus
2010-03-16 15:56         ` Tom Tromey
2010-03-16 16:05           ` Vladimir Prus
2010-03-16 16:23             ` Tom Tromey
2010-03-16 17:07               ` Vladimir Prus
2010-03-16 17:11                 ` Tom Tromey
2010-03-16 18:06                 ` Marc Khouzam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox