From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7541 invoked by alias); 10 Nov 2013 09:49:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 7528 invoked by uid 89); 10 Nov 2013 09:49:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 10 Nov 2013 09:49:37 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5C768116365 for ; Sun, 10 Nov 2013 04:50:00 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uQzNqHfv+-Ua for ; Sun, 10 Nov 2013 04:50:00 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E638A11634C for ; Sun, 10 Nov 2013 04:49:59 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 664B0E05D6; Sun, 10 Nov 2013 13:49:25 +0400 (RET) From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFC] Add ada-exception-catchpoints to -list-features command output. Date: Sun, 10 Nov 2013 17:16:00 -0000 Message-Id: <1384076960-12339-1-git-send-email-brobecker@adacore.com> X-SW-Source: 2013-11/txt/msg00265.txt.bz2 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