diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2010-03-23 21:46:33 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2010-03-23 21:46:33 +0000 |
commit | f224b49dcd9afdff4cc97bbb6d88dec3b4dfc433 (patch) | |
tree | cb6ca8113e3ac980a53fc6da11dfa253b0d99a87 /gdb/mi | |
parent | 6534d786b1826ee9e9742b9ab13b4a614fa648d0 (diff) | |
download | gdb-f224b49dcd9afdff4cc97bbb6d88dec3b4dfc433.zip gdb-f224b49dcd9afdff4cc97bbb6d88dec3b4dfc433.tar.gz gdb-f224b49dcd9afdff4cc97bbb6d88dec3b4dfc433.tar.bz2 |
-trace-start/-trace-end/-trace-status.
* mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status
and -trace-stop.
* mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status)
(mi_cmd_trace_stop): Declare.
* mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status)
(mi_cmd_trace_stop): New.
* tracepoint.c (start_tracing): New, extracted from...
(trace_start_command): ...this.
(trace_status_mi): New.
* tracepoint.h (struct trace_status): Document
stopping_tracepoint.
(start_tracing, stop_tracing, trace_status_mi): Declare.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmds.c | 3 | ||||
-rw-r--r-- | gdb/mi/mi-cmds.h | 3 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 20 |
3 files changed, 26 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index 7f18d94..c2183fb 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -105,6 +105,9 @@ struct mi_cmd mi_cmds[] = { "thread-info", { NULL, 0 }, mi_cmd_thread_info }, { "thread-list-ids", { NULL, 0 }, mi_cmd_thread_list_ids}, { "thread-select", { NULL, 0 }, mi_cmd_thread_select}, + { "trace-start", { NULL, 0 }, mi_cmd_trace_start }, + { "trace-status", { NULL, 0 }, mi_cmd_trace_status }, + { "trace-stop", { NULL, 0 }, mi_cmd_trace_stop }, { "var-assign", { NULL, 0 }, mi_cmd_var_assign}, { "var-create", { NULL, 0 }, mi_cmd_var_create}, { "var-delete", { NULL, 0 }, mi_cmd_var_delete}, diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index 20bdbfd..702dd9e 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -88,6 +88,9 @@ extern mi_cmd_argv_ftype mi_cmd_target_file_delete; extern mi_cmd_argv_ftype mi_cmd_thread_info; extern mi_cmd_argv_ftype mi_cmd_thread_list_ids; extern mi_cmd_argv_ftype mi_cmd_thread_select; +extern mi_cmd_argv_ftype mi_cmd_trace_start; +extern mi_cmd_argv_ftype mi_cmd_trace_status; +extern mi_cmd_argv_ftype mi_cmd_trace_stop; extern mi_cmd_argv_ftype mi_cmd_var_assign; extern mi_cmd_argv_ftype mi_cmd_var_create; extern mi_cmd_argv_ftype mi_cmd_var_delete; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 4e31c72..c30e0e5 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -51,6 +51,7 @@ #include "inferior.h" #include "osdata.h" #include "splay-tree.h" +#include "tracepoint.h" #include <ctype.h> #include <sys/time.h> @@ -2077,3 +2078,22 @@ print_diff (struct mi_timestamp *start, struct mi_timestamp *end) timeval_diff (start->utime, end->utime) / 1000000.0, timeval_diff (start->stime, end->stime) / 1000000.0); } + +void +mi_cmd_trace_start (char *command, char **argv, int argc) +{ + start_tracing (); +} + +void +mi_cmd_trace_status (char *command, char **argv, int argc) +{ + trace_status_mi (0); +} + +void +mi_cmd_trace_stop (char *command, char **argv, int argc) +{ + stop_tracing (); + trace_status_mi (1); +} |