From patchwork Tue Nov 10 16:03:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 9642 Received: (qmail 20987 invoked by alias); 10 Nov 2015 16:04:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20893 invoked by uid 89); 10 Nov 2015 16:04:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 10 Nov 2015 16:04:01 +0000 Received: by wmec201 with SMTP id c201so8326871wme.1 for ; Tue, 10 Nov 2015 08:03:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=vdrHGoKOf+j2bNAeCYfiJmfv9UpgTA1EXMaXkZZAAiQ=; b=LGGwXLD8iEbcTjtDaQVlBEynWoUxi7gIqTh8XOjqiqku5UTslEIjiVrSy7vWolTGv/ sW/i1hn6EvPGljW4beQMoEHclm9tjOzWSp10XAQbybrnyBFpGpgs5h+JBxOomadHatjh PvQ1AAiO1esCR7SjdwaxsKf+dQdeLwCjZ6RlXOOvcuVzzjhvYBGyQ29t1BNFYI2a7iee QV246WQvJWLUGAVYiazFHzDp6aV0dUw3wwl+rVc2j/AAHgYsaDytRxOX/liesrgwnlO4 uaw+IzmVTjGPtUj18UrtXmjHFDYEWtSANVGXVr1rBU3GzivQPlkTl4Bo6vryKIOMeIUA GyFA== X-Gm-Message-State: ALoCoQmGwLW2UmbXjMYElZV5hjE0F0WFkxuXwrlrVEHsm8aQZAZ6K0OTgd5uv6XSZeYUDV0RD2eh X-Received: by 10.28.63.22 with SMTP id m22mr19574527wma.58.1447171438519; Tue, 10 Nov 2015 08:03:58 -0800 (PST) Received: from localhost (host81-131-205-73.range81-131.btcentralplus.com. [81.131.205.73]) by smtp.gmail.com with ESMTPSA id m64sm1349477wmf.14.2015.11.10.08.03.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Nov 2015 08:03:57 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/2] gdb: Make use of 'add_info' to create info sub-commands. Date: Tue, 10 Nov 2015 16:03:51 +0000 Message-Id: <6df01fb4f21fc58f93e403cae0e38836066f74d7.1447171209.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Switch to using 'add_info' function for creating basic info sub-commands. gdb/ChangeLog: * avr-tdep.c (_initialize_avr_tdep): Switch to 'add_info' for creating info sub-commands. * gnu-nat.c (add_task_commands): Likewise. * macrocmd.c (_initialize_macrocmd): Likewise. --- gdb/ChangeLog | 7 +++++++ gdb/avr-tdep.c | 5 ++--- gdb/gnu-nat.c | 25 ++++++++++--------------- gdb/macrocmd.c | 15 ++++++--------- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4316c95..2b12fb4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2015-11-09 Andrew Burgess + * avr-tdep.c (_initialize_avr_tdep): Switch to 'add_info' for creating + info sub-commands. + * gnu-nat.c (add_task_commands): Likewise. + * macrocmd.c (_initialize_macrocmd): Likewise. + +2015-11-09 Andrew Burgess + * cli/cli-decode.c (add_info): Switch to class_info. 2015-11-09 Joel Brobecker diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 9c54b2d..ccc8b45 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1632,7 +1632,6 @@ _initialize_avr_tdep (void) /* FIXME: TRoth/2002-02-18: This should probably be changed to 'info avr io_registers' to signify it is not available on other platforms. */ - add_cmd ("io_registers", class_info, avr_io_reg_read_command, - _("query remote avr target for io space register values"), - &infolist); + add_info ("io_registers", avr_io_reg_read_command, + _("query remote avr target for io space register values")); } diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index d3f54d0..5e4d705 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -3264,21 +3264,16 @@ This is the same as setting `task pause', `exceptions', and\n\ &setlist); /* Commands to show information about the task's ports. */ - add_cmd ("send-rights", class_info, info_send_rights_cmd, - _("Show information about the task's send rights"), - &infolist); - add_cmd ("receive-rights", class_info, info_recv_rights_cmd, - _("Show information about the task's receive rights"), - &infolist); - add_cmd ("port-rights", class_info, info_port_rights_cmd, - _("Show information about the task's port rights"), - &infolist); - add_cmd ("port-sets", class_info, info_port_sets_cmd, - _("Show information about the task's port sets"), - &infolist); - add_cmd ("dead-names", class_info, info_dead_names_cmd, - _("Show information about the task's dead names"), - &infolist); + add_info ("send-rights", info_send_rights_cmd, + _("Show information about the task's send rights")); + add_info ("receive-rights", info_recv_rights_cmd, + _("Show information about the task's receive rights")); + add_info ("port-rights", info_port_rights_cmd, + _("Show information about the task's port rights")); + add_info ("port-sets", info_port_sets_cmd, + _("Show information about the task's port sets")); + add_info ("dead-names", info_dead_names_cmd, + _("Show information about the task's dead names")); add_info_alias ("ports", "port-rights", 1); add_info_alias ("port", "port-rights", 1); add_info_alias ("psets", "port-sets", 1); diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index aca4fdc..aae3b6d 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -522,21 +522,18 @@ expression work together to yield a pre-processed expression."), ¯olist); add_alias_cmd ("exp1", "expand-once", no_class, 1, ¯olist); - add_cmd ("macro", no_class, info_macro_command, - _("Show the definition of MACRO, and it's source location.\n\ + add_info ("macro", info_macro_command, + _("Show the definition of MACRO, and it's source location.\n\ Usage: info macro [-a|-all] [--] MACRO\n\ Options: \n\ -a, --all Output all definitions of MACRO in the current compilation\ unit.\n\ - -- Specify the end of arguments and the beginning of the MACRO."), + -- Specify the end of arguments and the beginning of the MACRO.")); - &infolist); - - add_cmd ("macros", no_class, info_macros_command, - _("Show the definitions of all macros at LINESPEC, or the current \ + add_info ("macros", info_macros_command, + _("Show the definitions of all macros at LINESPEC, or the current \ source location.\n\ -Usage: info macros [LINESPEC]"), - &infolist); +Usage: info macros [LINESPEC]")); add_cmd ("define", no_class, macro_define_command, _("\ Define a new C/C++ preprocessor macro.\n\