From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsec105.isp.belgacom.be (mailsec105.isp.belgacom.be [195.238.20.101]) by sourceware.org (Postfix) with ESMTPS id C9A59385E000 for ; Sun, 22 Mar 2020 18:05:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C9A59385E000 IronPort-SDR: Wl9eXbJ/SJnZoLYisfFZKpbeSg2LzzY2Elt4wraxgioLmNlkICrg+C7pyjlrX7E4RZharegARe +fsq/aQ+0SWzUF8yCt8KNAB9K+1F3N1T6Uc0OdcZH+KkgsUEKrM4ry/7QdC66P89YCEwP/Nb1u DLj+BfEWOURfso9R7DfQRLgWFdRI8UZeHeE4pqzyNXQQy1oS+dJSCDMLi9iMAgxMvb6xJ2qSd2 pVdBOlgdL4r2Fcr5aoKOiXiAJpwaL5CWjIvKEmPt+vbUZwA1OcLN8AO6/SxwTHFYLMOeHpO+qE VBI= IronPort-PHdr: =?us-ascii?q?9a23=3AndCeqhQsS6JoRvE0WXmYZ0GtQNpsv+yvbD5Q0Y?= =?us-ascii?q?Iujvd0So/mwa6yYx2N2/xhgRfzUJnB7Loc0qyK6vymADBeqs/Z4TgrS99laV?= =?us-ascii?q?wssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk?= =?us-ascii?q?2sfQV6Kf7oFYHMks+5y/69+4HJYwVPmTGxfa5+IA+5oAnMucQam5ZuJ6kwxx?= =?us-ascii?q?fGv3dEZ+Bbzn50KFyOmBrx+si/8Jl//ipKpvkv7dRAUaL0f6Q5SbxXEjErOH?= =?us-ascii?q?0r6cPoqBfOUxKB6mMTXWsKnBVIBRPF7AzhUZfqriT6rOt91zKEMsDwULs5RC?= =?us-ascii?q?6t76ZvSB/vlScHKzs0+3zZh8BskK5Wpg+qqBthzYHKb4CVKONwfqXZfdIaXG?= =?us-ascii?q?ZNR9pcWiJDD46ydocDE+UMNvtco4T9u1cCqB2zDhSuCuzy0D9Fnnz407A63e?= =?us-ascii?q?o/Hw/J3gIgEM4Av3vbo9v4L7sSXOKvwaXU0TnOdfFb1DHg44bIaBAhpvSMUK?= =?us-ascii?q?pqf8rRyEkvEwLFjk2IqYP7Ijia1v4Cs3Kc7+p5SOKvinAoqxtqojOywcosko?= =?us-ascii?q?nJhoMRylDF7SV52Jg6Kce2SUFhe96kF4JQtzybN4RoWMMiWHpluD05yrwGv5?= =?us-ascii?q?60YjQKxI48yBHBcvGKdZWD7BzkVOaUOzh4hXRldaqkhxa17Eig0PHzWde60V?= =?us-ascii?q?lQtCpKjMPAtncX1xzc7MWMV/hz/l+51DqRygze6PtILV06mKfaMZIswaM8mo?= =?us-ascii?q?AdvEnNGCL9hV/4g7WMdko+/+il8+HnYrL7qZCCL4J0kQT+Mrg2msy4HOQ4Lh?= =?us-ascii?q?ACX2iF9uS4073u5Uj5T6hSgv03lKnWrozaKNwFqqKkAQJZyJsv5hi+Aju809?= =?us-ascii?q?kUgGMLIVxLdR6fiojmIVDOIPT2DfelhFSslS9mx+jGPr3gBpXNL2DDkK//cr?= =?us-ascii?q?pn5U9T0hAzzddG55JJC7EOPujzWlTqudzDDR84Mwq0zPj7CNlnzYwRR3qDAr?= =?us-ascii?q?WFP6PKrV+I+uUvLvGDZIAIoznxMuAl6OTyjXAlmV8SY7Kp0IAMaHC/A/RmOV?= =?us-ascii?q?mWbmTig9gbC2cFoBAyTOvwiF2NAnZvYCO9U6h5/jgnA4KrFq/YQZ23i7Ge1T?= =?us-ascii?q?22WJpMaTNoEFeJRE/odoGFQ+8BIB2bOMh4jz0JT6PpH5ch1BWvrBf3jaVuNO?= =?us-ascii?q?3N5ywVr4nLz9tk4eDP0xs/o28nR/+B2n2AGjkn1lgDQCU7if0nrA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2D5EABjqHde/yFRiNlmgkECgidsdRI?= =?us-ascii?q?qg1BIiQKIFZlKgXsJAQEBAQEBAQEBCCMJAQIEAQGERQKCISc2Bw4CAwEBAQM?= =?us-ascii?q?CBQEBBgEBAQEBAQQEAWwEAQEHCoRRIQEDAQEFCgE3DEIWAQGBYQwMD4MCAQU?= =?us-ascii?q?jMzMIAxgCAiYCAlczgw2DAAurPIEyhDUBAwIMQ0KDT4E4BoEOKgGMPYFMP4E?= =?us-ascii?q?RgmYuPoJkA4R1gl4EjXmKAZdddgeCP3sEhl+PKR2bWZgakwyBWQsngVhtgz9?= =?us-ascii?q?QJY5ViE+FQkMwgSEIE4h/WYQJAQE?= X-IPAS-Result: =?us-ascii?q?A2D5EABjqHde/yFRiNlmgkECgidsdRIqg1BIiQKIFZlKg?= =?us-ascii?q?XsJAQEBAQEBAQEBCCMJAQIEAQGERQKCISc2Bw4CAwEBAQMCBQEBBgEBAQEBA?= =?us-ascii?q?QQEAWwEAQEHCoRRIQEDAQEFCgE3DEIWAQGBYQwMD4MCAQUjMzMIAxgCAiYCA?= =?us-ascii?q?lczgw2DAAurPIEyhDUBAwIMQ0KDT4E4BoEOKgGMPYFMP4ERgmYuPoJkA4R1g?= =?us-ascii?q?l4EjXmKAZdddgeCP3sEhl+PKR2bWZgakwyBWQsngVhtgz9QJY5ViE+FQkMwg?= =?us-ascii?q?SEIE4h/WYQJAQE?= Received: from 33.81-136-217.adsl-dyn.isp.belgacom.be (HELO md) ([217.136.81.33]) by relay.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Mar 2020 19:05:53 +0100 Message-ID: Subject: Re: PING^2. Re: [RFAv5 0/3] Allow the user to define default args for commands and aliases From: Philippe Waroquiers To: gdb-patches@sourceware.org Date: Sun, 22 Mar 2020 19:05:53 +0100 In-Reply-To: References: <20200307131428.11942-1-philippe.waroquiers@skynet.be> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 18:05:58 -0000 Ping^2? Note that this series went under several review cycles since August last year. So I would assume it is now reasonably close to be ready to be pushed thanks Philippe On Sun, 2020-03-15 at 14:14 +0100, Philippe Waroquiers via Gdb-patches wrote: > Any additional comments ? > > Thanks > > Philippe > > > On Sat, 2020-03-07 at 14:14 +0100, Philippe Waroquiers wrote: > > Allow the user to define default args for commands and aliases. > > > > This patch series implements, tests and documents the following commands: > > > > set default-args COMMAND [DEFAULT-ARGS...] > > show default-args [COMMAND] > > set enable-default-args [on|off] > > show enable-default-args > > > > > > It also changes the alias command to be: > > alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...] > > > > > > Using the above default-args commands and arguments, you can > > define default arguments for commands or define powerful aliases. > > > > For example: > > > > alias bt_ALL = backtrace -entry-values both -frame-arg all -past-main -past-entry -full > > > > defines the alias bt_ALL that will give as much information as possible > > in a backtrace. > > > > Default args can usefully be combined with the 'with' command, such as: > > > > Make "wLapPeu" an alias of 2 nested "with": > > alias wLapPeu = with language pascal -- with print elements unlimited -- > > > > or have an alias pp10 to pretty print an expression with a maximum of > > 10 elements: > > > > alias pp10 = with print pretty -- with print elem 10 -- print > > > > This patch series also adds a completer for 'alias'. > > > > > > This is the version 5 of the patch series. > > Compared the version 4, the changes are handling the comments of > > Christian and Eli: > > * Declarations are moved close to their first use. > > * strchr (text, '='); used instead of strstr. > > * More consistent use of nullptr instead of NULL > > * std::string default_args used instead of const char *default_args > > * Updated/clarified NEWS and gdb.texinfo, as commented by Eli. > > > > Previous versions handled various comments of Pedro and Tom. > > > > For what concerns changing 'alias -a' to 'alias -abbreviation": > > This can for sure be done (and be backward compatible). This can however > > be done as a separate patch (I still also need to do a similar change > > for the 'qcs' flags). > > > > Note 1: a preliminary version of this idea (using a command called > > 'add-args') was discussed in > > https://sourceware.org/ml/gdb-patches/2019-06/msg00395.html > > where Tom suggested to make it more GDB like, using 'set' command. > > > > Note 2: Following another comment of Tom, there is no '=' character > > to separate COMMAND from its default args. > > If ever this would be ambiguous in some cases, we could introduce > > an optional '=' character to separate COMMAND from its DEFAULT-ARGS. > > Similarly, the alias command has no separator between COMMAND > > and its DEFAULT-ARGS. > > > > > >