aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-break.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2010-03-23 21:48:14 +0000
committerVladimir Prus <vladimir@codesourcery.com>2010-03-23 21:48:14 +0000
commit9b4c786c6c9f2599873343b935a46a446ba1c029 (patch)
treeadd4a2270f4c5c978a8d4914916ce8afefbc1e58 /gdb/mi/mi-cmd-break.c
parentf224b49dcd9afdff4cc97bbb6d88dec3b4dfc433 (diff)
downloadgdb-9b4c786c6c9f2599873343b935a46a446ba1c029.zip
gdb-9b4c786c6c9f2599873343b935a46a446ba1c029.tar.gz
gdb-9b4c786c6c9f2599873343b935a46a446ba1c029.tar.bz2
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.
Diffstat (limited to 'gdb/mi/mi-cmd-break.c')
-rw-r--r--gdb/mi/mi-cmd-break.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 3fcd85b..c5a098e 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.