diff options
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); +} |