From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [MI tracepoints 5/9] -break-passcount
Date: Sun, 14 Mar 2010 08:56:00 -0000 [thread overview]
Message-ID: <201003141156.07046.vladimir@codesourcery.com> (raw)
[-- 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;
next reply other threads:[~2010-03-14 8:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-14 8:56 Vladimir Prus [this message]
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
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=201003141156.07046.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/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