aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-09-16 14:59:31 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-09-16 14:59:31 +0000
commit084344da4284d1eb7ff15f6d179ced8235298d45 (patch)
treefbc5fbfab335d516e48e57a51702d2d7f4b3d795 /gdb/mi
parentea9eba9bfac72e58d12477e91af0198e1a141884 (diff)
downloadbinutils-084344da4284d1eb7ff15f6d179ced8235298d45.zip
binutils-084344da4284d1eb7ff15f6d179ced8235298d45.tar.gz
binutils-084344da4284d1eb7ff15f6d179ced8235298d45.tar.bz2
* mi/mi-cmds.c (mi_cmds): Register -list-features.
* mi/mi-cmds.h (mi_cmd_list_features): New. * mi/mi-main.c (mi_cmd_list_features): New.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmds.c1
-rw-r--r--gdb/mi/mi-cmds.h1
-rw-r--r--gdb/mi/mi-main.c19
3 files changed, 21 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 48ba208..5bd8725 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -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 },
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 7b3eb0e..9888c85 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -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;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 0c4b904..93e28bf 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1075,6 +1075,25 @@ mi_cmd_enable_timings (char *command, char **argv, int argc)
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");
+
+ ui_out_field_string (uiout, NULL, "frozen-varobjs");
+
+ 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.