From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: [mi] -list-features
Date: Tue, 28 Aug 2007 17:12:00 -0000 [thread overview]
Message-ID: <fb1l06$dl3$1@sea.gmane.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
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 #2: list_features.ChangeLog --]
[-- Type: text/plain, Size: 142 bytes --]
* 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: list_features.diff --]
[-- Type: text/x-diff; name="list_features.diff", Size: 1825 bytes --]
--- 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.
next reply other threads:[~2007-08-28 17:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-28 17:12 Vladimir Prus [this message]
2007-08-28 17:15 ` Daniel Jacobowitz
2007-08-28 17:47 ` Vladimir Prus
2007-08-29 17:55 ` Eli Zaretskii
2007-08-31 7:06 ` Vladimir Prus
2007-08-31 7:27 ` Nick Roberts
2007-08-31 7:38 ` Vladimir Prus
2007-08-31 9:00 ` Nick Roberts
2007-08-31 8:50 ` Eli Zaretskii
2007-08-31 9:00 ` Vladimir Prus
2007-08-31 9:18 ` Eli Zaretskii
2007-08-31 9:33 ` Nick Roberts
2007-08-31 9:44 ` Vladimir Prus
2007-08-31 10:02 ` Nick Roberts
2007-08-31 10:13 ` Vladimir Prus
2007-08-31 20:12 ` Nick Roberts
2007-08-31 10:19 ` Vladimir Prus
2007-08-31 18:08 ` Eli Zaretskii
2007-09-07 20:26 ` Vladimir Prus
2007-09-08 7:24 ` Eli Zaretskii
2007-09-16 14:23 ` Vladimir Prus
2007-09-16 14:38 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='fb1l06$dl3$1@sea.gmane.org' \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox