diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-08-19 13:05:02 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-08-19 13:05:02 +0000 |
commit | c6ebd6cf9956565b8b2c3e14a54dea6c467f48d4 (patch) | |
tree | e35cffef73d4cdeba52ea413769fc16c33979a5f /gdb/mi | |
parent | 073120b913e2614f309c5b6d0c313308ed2b4c82 (diff) | |
download | fsf-binutils-gdb-c6ebd6cf9956565b8b2c3e14a54dea6c467f48d4.zip fsf-binutils-gdb-c6ebd6cf9956565b8b2c3e14a54dea6c467f48d4.tar.gz fsf-binutils-gdb-c6ebd6cf9956565b8b2c3e14a54dea6c467f48d4.tar.bz2 |
* target.c (target_async_permitted, target_async_permitted_1)
(set_maintenance_target_async_permitted)
(show_maintenance_target_async_permitted): New.
(initialize_targets): Register 'set target-async'.
* target.h (target_async_permitted): Declare.
* linux-nat.c (linux_nat_async_enabled)
(linux_nat_async_permitted, set_maintenance_linux_async_permitted)
(show_maintenance_linux_async_permitted): Remove.
(sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
(get_pending_events, linux_nat_async): Use target_async_permitted.
(linux_nat_set_async_mode): Remove, moving the only used bits
into...
(linux_nat_setup_async): This.
(_initialize_linux_nat): Do not register 'maint set linux-async'.
Use linux_nat_setup_async.
* remote.c (remote_async_permitted, remote_async_permitted_set)
(set_maintenance_remote_async_permitted)
(show_maintenance_remote_async_permitted): Remove.
(remote_open_1, remote_terminal_inferior, remote_can_async_p)
(remote_is_async_p): Use target_async_permitted.
(_initialize_remote): Don't register 'main set remote-async'.
* mi/mi-cmds.c (mi_cmds): Register -list-target-features.
* mi/mi-cmds.h (mi_cmd_list_target_features): New.
* mi/mi-main.c (mi_cmd_list_target_features): New.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmds.c | 1 | ||||
-rw-r--r-- | gdb/mi/mi-cmds.h | 1 | ||||
-rw-r--r-- | gdb/mi/mi-main.c | 20 |
3 files changed, 21 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c index 3ae4c95..ca0f428 100644 --- a/gdb/mi/mi-cmds.c +++ b/gdb/mi/mi-cmds.c @@ -89,6 +89,7 @@ struct mi_cmd mi_cmds[] = { "inferior-tty-show", { NULL, 0 }, mi_cmd_inferior_tty_show}, { "interpreter-exec", { NULL, 0 }, mi_cmd_interpreter_exec}, { "list-features", { NULL, 0 }, mi_cmd_list_features}, + { "list-target-features", { NULL, 0 }, mi_cmd_list_target_features}, { "overlay-auto", { NULL, 0 }, NULL }, { "overlay-list-mapping-state", { NULL, 0 }, NULL }, { "overlay-list-overlays", { NULL, 0 }, NULL }, diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index 72e18c7..16887ae 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -66,6 +66,7 @@ extern mi_cmd_argv_ftype mi_cmd_inferior_tty_set; extern mi_cmd_argv_ftype mi_cmd_inferior_tty_show; extern mi_cmd_argv_ftype mi_cmd_interpreter_exec; extern mi_cmd_argv_ftype mi_cmd_list_features; +extern mi_cmd_argv_ftype mi_cmd_list_target_features; extern mi_cmd_argv_ftype mi_cmd_stack_info_depth; extern mi_cmd_argv_ftype mi_cmd_stack_info_frame; extern mi_cmd_argv_ftype mi_cmd_stack_list_args; diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 30e62f6..332ce42 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -915,7 +915,25 @@ mi_cmd_list_features (char *command, char **argv, int argc) error ("-list-features should be passed no arguments"); } - + +void +mi_cmd_list_target_features (char *command, char **argv, int argc) +{ + if (argc == 0) + { + struct cleanup *cleanup = NULL; + cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); + + if (target_can_async_p ()) + ui_out_field_string (uiout, NULL, "async"); + + do_cleanups (cleanup); + return; + } + + error ("-list-target-features should be passed no arguments"); +} + /* Execute a command within a safe environment. Return <0 for error; >=0 for ok. |