diff options
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmds.c | 3 | ||||
-rw-r--r-- | gdb/mi/mi-cmds.h | 1 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 19 |
3 files changed, 21 insertions, 2 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index c651694..89c63769 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -130,8 +130,7 @@ struct mi_cmd mi_cmds[] = { "target-list-current-targets", { NULL, 0 }, NULL, NULL }, { "target-list-parameters", { NULL, 0 }, NULL, NULL }, { "target-select", { NULL, 0 }, mi_cmd_target_select}, - { "thread-info", { NULL, 0 }, NULL, NULL }, - { "thread-list-all-threads", { NULL, 0 }, NULL, NULL }, + { "thread-info", { NULL, 0 }, NULL, mi_cmd_thread_info }, { "thread-list-ids", { NULL, 0 }, 0, mi_cmd_thread_list_ids}, { "thread-select", { NULL, 0 }, 0, mi_cmd_thread_select}, { "trace-actions", { NULL, 0 }, NULL, NULL }, diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index 2d0393b..6a033e5 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -105,6 +105,7 @@ extern mi_cmd_argv_ftype mi_cmd_target_file_get; extern mi_cmd_argv_ftype mi_cmd_target_file_put; extern mi_cmd_argv_ftype mi_cmd_target_file_delete; extern mi_cmd_args_ftype mi_cmd_target_select; +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_var_assign; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 41e12d2..cea8503 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -277,6 +277,24 @@ mi_cmd_thread_list_ids (char *command, char **argv, int argc) } enum mi_cmd_result +mi_cmd_thread_info (char *command, char **argv, int argc) +{ + int thread = -1; + + if (argc != 0 && argc != 1) + { + mi_error_message = xstrprintf ("Invalid MI command"); + return MI_CMD_ERROR; + } + + if (argc == 1) + thread = atoi (argv[0]); + + print_thread_info (uiout, thread); + return MI_CMD_DONE; +} + +enum mi_cmd_result mi_cmd_data_list_register_names (char *command, char **argv, int argc) { int regnum, numregs; @@ -1055,6 +1073,7 @@ mi_cmd_list_features (char *command, char **argv, int argc) ui_out_field_string (uiout, NULL, "frozen-varobjs"); ui_out_field_string (uiout, NULL, "pending-breakpoints"); + ui_out_field_string (uiout, NULL, "thread-info"); do_cleanups (cleanup); |