This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Some time ago I've proposed to add MI command that will list "supported features", to enable frontends to conditionalize their behaviour easily. It was generally supported, so here there patch. So far, no features are reported. OK? - Volodya
Attachment:
list_features.ChangeLog
Description: Text document
--- gdb/mi/mi-cmds.c (/mirrors/gdb_mainline) (revision 4644) +++ gdb/mi/mi-cmds.c (/patches/gdb/list_features) (local) @@ -88,6 +88,7 @@ struct mi_cmd mi_cmds[] = { "inferior-tty-set", { NULL, 0 }, NULL, mi_cmd_inferior_tty_set}, { "inferior-tty-show", { NULL, 0 }, NULL, mi_cmd_inferior_tty_show}, { "interpreter-exec", { NULL, 0 }, 0, mi_cmd_interpreter_exec}, + { "list-features", { NULL, 0 }, 0, mi_cmd_list_features}, { "overlay-auto", { NULL, 0 }, NULL, NULL }, { "overlay-list-mapping-state", { NULL, 0 }, NULL, NULL }, { "overlay-list-overlays", { NULL, 0 }, NULL, NULL }, --- gdb/mi/mi-cmds.h (/mirrors/gdb_mainline) (revision 4644) +++ gdb/mi/mi-cmds.h (/patches/gdb/list_features) (local) @@ -91,6 +91,7 @@ extern mi_cmd_argv_ftype mi_cmd_gdb_exit 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_stack_info_depth; extern mi_cmd_argv_ftype mi_cmd_stack_info_frame; extern mi_cmd_argv_ftype mi_cmd_stack_list_args; --- gdb/mi/mi-main.c (/mirrors/gdb_mainline) (revision 4644) +++ gdb/mi/mi-main.c (/patches/gdb/list_features) (local) @@ -1075,6 +1075,23 @@ mi_cmd_enable_timings (char *command, ch return MI_CMD_ERROR; } +enum mi_cmd_result +mi_cmd_list_features (char *command, char **argv, int argc) +{ + if (argc == 0) + { + struct cleanup *cleanup = NULL; + cleanup = make_cleanup_ui_out_list_begin_end (uiout, "features"); + + do_cleanups (cleanup); + + return MI_CMD_DONE; + } + + error ("-list-features should be passed no arguments"); + return MI_CMD_ERROR; +} + /* Execute a command within a safe environment. Return <0 for error; >=0 for ok.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |