This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/commit+doco] Add "language-option" to -list-features
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 14 Nov 2013 15:17:01 +0400
- Subject: [RFA/commit+doco] Add "language-option" to -list-features
- Authentication-results: sourceware.org; auth=none
Hello,
Following the addition of the --language optiton to all GDB/MI
commands, I realized that there was no easy way for front-ends
to figure out whether this features is available or not. So I added
a "language-option" entry to -list-features.
gdb/ChangeLog:
* mi/mi-main.c (mi_cmd_list_features): Add "language-options"
to -list-features output.
gdb/doc/ChangeLog:
* gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new
"language-option" entry in the output of the "-list-features"
command.
Tested on x86_64-linux. I think the code change is fairly
straightforward, and easy to adjust if there are suggestions.
So I'll commit as soon as the doco has been OK'ed.
Thanks!
--
Joel
---
gdb/doc/gdb.texinfo | 3 +++
gdb/mi/mi-main.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index a164785..29955f6 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -35106,6 +35106,9 @@ Indicates support for the @code{-ada-task-info} command.
Indicates support for the following commands, all of them related to Ada
exceptions: @code{-info-ada-exceptions}, @code{-catch-assert} and
@code{-catch-exception}.
+@item language-option
+Indicates that all @sc{gdb/mi} commands accept the @option{--language}
+option (@pxref{Context management}).
@end table
@subheading The @code{-list-target-features} Command
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index bbf944a..83d524a 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1816,6 +1816,7 @@ mi_cmd_list_features (char *command, char **argv, int argc)
ui_out_field_string (uiout, NULL, "breakpoint-notifications");
ui_out_field_string (uiout, NULL, "ada-task-info");
ui_out_field_string (uiout, NULL, "ada-exceptions");
+ ui_out_field_string (uiout, NULL, "language-option");
#if HAVE_PYTHON
if (gdb_python_initialized)
--
1.8.1.2