Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Add ada-exception-catchpoints to -list-features command output.
@ 2013-11-10 17:16 Joel Brobecker
  2013-11-10 22:16 ` Eli Zaretskii
  2013-11-11 15:22 ` Tom Tromey
  0 siblings, 2 replies; 42+ messages in thread
From: Joel Brobecker @ 2013-11-10 17:16 UTC (permalink / raw)
  To: gdb-patches

Hello,

The -list-features GDB/MI command is extremely useful to GDB frontends
who would like to know whether the underlying GDB supports a given
feature or not. Recently, I added new coommands for Ada exception
catching, but forgot about -list-features.

This patch adds an entry meant to help the frontend for those features.
But looking at the way the -list-features command is designed, I am
wondering whether this approach is going to scale well. As new commands
and other new features or major bug fixes get in, it seems like the
list is going to grow maybe a little beyond what's reasonable.

Without trying to redesign this feature entirely, since we're far from
being in that difficult situation, I am thinking it would be OK
to aggregate both fields related to Ada exceptions, namely...

  - "info-ada-exceptions" (being introduced as we speak, see
    http://www.sourceware.org/ml/gdb-patches/2013-11/msg00232.html)

  - this new field (I chose "ada-exceptions-catchpoints")

... into a single field. For instance, we could chose "ada-exceptions",
meant to cover both the commands already in (for catching Ada exceptions),
and the new command being introduced (for listing all Ada exceptions).

So, although this patch proposes a new field (this is the straightforward
approach), given that all this GDB/MI work was done within the same
release cycle, and withing a reasonable amount of time, I think it
would be fine for everyone to use one single field in -list-features.

Thoughts?

In practical terms, I would drop the part in the patch quoted above
that adds the new -list-features field, and would propose another
one, distinct from the "-info-ada-exceptions" patch, which would
then introduce the new "ada-exceptions" -list-features field instead.

Thank you!

gdb/ChangeLog:

        * mi/mi-main.c (mi_cmd_list_features): Add
        "ada-exception-catchpoints" to -list-features output.

gdb/doc/ChangeLog:

        * gdb.texinfo (GDB/MI Miscellaneous Commands): Document new
        field "ada-exception-catchpoints" in -list-features output.
---
 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 9127f94..9731bbf 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -34971,6 +34971,9 @@ CLI will be announced via async records.
 indicates support for the @code{-ada-task-info} command.
 @item info-ada-exceptions
 indicates support for the @code{-info-ada-exceptions} command.
+@item ada-exception-catchpoints
+indicates support for the @code{-catch-assert} and @code{-catch-exception}
+commands.
 @end table
 
 @subheading The @code{-list-target-features} Command
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index bf0fce3..8ff7f27 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, "info-ada-exceptions");
+      ui_out_field_string (uiout, NULL, "ada-exception-catchpoints");
       
 #if HAVE_PYTHON
       if (gdb_python_initialized)
-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2013-12-03  4:08 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-10 17:16 [RFC] Add ada-exception-catchpoints to -list-features command output Joel Brobecker
2013-11-10 22:16 ` Eli Zaretskii
2013-11-12 11:25   ` Joel Brobecker
2013-11-12 16:39     ` Eli Zaretskii
2013-11-13  3:02       ` Joel Brobecker
2013-11-11 15:22 ` Tom Tromey
2013-11-12  9:18   ` Joel Brobecker
2013-11-12 12:11   ` [RFC] New GDB/MI command "-info-gdb-mi-command" Joel Brobecker
2013-11-12 17:04     ` Eli Zaretskii
2013-11-12 17:48       ` Joel Brobecker
2013-11-12 18:34         ` Eli Zaretskii
2013-11-13  3:19           ` Joel Brobecker
2013-11-12 21:17     ` André Pönitz
2013-11-13  2:47       ` Joel Brobecker
2013-11-14  0:36         ` André Pönitz
2013-11-14  9:48           ` Joel Brobecker
2013-11-14 18:31             ` André Pönitz
2013-11-14 19:03         ` Pedro Alves
2013-11-14 19:37           ` Pedro Alves
2013-11-14 20:30             ` Tom Tromey
2013-11-15  5:35               ` Joel Brobecker
2013-11-15 12:39                 ` Pedro Alves
2013-11-15 14:38                   ` Joel Brobecker
2013-11-15 14:40                     ` Pedro Alves
2013-11-18 17:12                       ` [RFA GDB/MI] Help determine if GDB/MI command exists or not Joel Brobecker
2013-11-18 17:13                         ` [RFA 1/2] New GDB/MI command "-info-gdb-mi-command" Joel Brobecker
2013-11-18 17:29                           ` Eli Zaretskii
2013-11-19  4:35                             ` Joel Brobecker
2013-11-19 16:11                               ` Eli Zaretskii
2013-12-02  3:26                               ` Joel Brobecker
2013-12-02  3:51                                 ` Eli Zaretskii
2013-12-02  4:41                                   ` Joel Brobecker
2013-12-02 14:53                               ` Pedro Alves
2013-12-03  4:06                                 ` pushed: " Joel Brobecker
2013-11-18 17:21                         ` [RFA 2/2] Add "undefined-command" error code at end of ^error result Joel Brobecker
2013-11-18 17:29                           ` Eli Zaretskii
2013-11-19  6:02                             ` Joel Brobecker
2013-11-19 16:16                               ` Eli Zaretskii
2013-11-19 11:19                           ` Pedro Alves
2013-11-20  3:46                             ` Joel Brobecker
2013-12-03  4:08                               ` pushed: " Joel Brobecker
2013-11-19 15:05                         ` [RFA GDB/MI] Help determine if GDB/MI command exists or not Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox