From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128832 invoked by alias); 19 Jun 2019 19:44:04 -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 128822 invoked by uid 89); 19 Jun 2019 19:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=obscure, successive, H*RU:sk:cm12.we, H*RU:100.42.49.8 X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.222) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jun 2019 19:44:01 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 9193DBB57 for ; Wed, 19 Jun 2019 14:44:00 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id dgUyhGLgOiQerdgUyhmxSq; Wed, 19 Jun 2019 14:44:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=X1dt+/v134DUqYIZBk/D0qepzahZ/sjz1WRAUdEcJxg=; b=x6zshpQiZurJCgwT/r3eOoB+Z4 jadIGzS2qYA6kxsBFeovvZlfJTF2PPM1K1YgX5xK30UOlsNNCX4RkZHTDYpCdPFViXUU0RtK+bpBy q2HpPnhnA2uvMopOjELDK4/x5; Received: from 75-166-12-78.hlrn.qwest.net ([75.166.12.78]:47410 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hdgUy-003NoB-A2; Wed, 19 Jun 2019 14:44:00 -0500 From: Tom Tromey To: Philippe Waroquiers Cc: Pedro Alves , Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 0/4] Improve "show style", use style in "help" and "apropos". References: <20190531131903.21203-1-philippe.waroquiers@skynet.be> <02aed9b6-1ce0-b48f-ed01-ef0fc0fa20b5@redhat.com> <1560888703.8865.1.camel@skynet.be> <87sgs6hb9f.fsf@tromey.com> <1560891176.8865.3.camel@skynet.be> <1560891478.8865.5.camel@skynet.be> <32b0b61b-755a-0ca9-b854-3e9db5d781ea@redhat.com> <1560903910.8865.10.camel@skynet.be> Date: Wed, 19 Jun 2019 19:44:00 -0000 In-Reply-To: <1560903910.8865.10.camel@skynet.be> (Philippe Waroquiers's message of "Wed, 19 Jun 2019 02:25:10 +0200") Message-ID: <87tvcle4xs.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-06/txt/msg00395.txt.bz2 >>>>> "Philippe" =3D=3D Philippe Waroquiers = writes: Philippe> Note that I am envisaging to do a small addition Philippe> to the 'define' command so as to make it slightly Philippe> easier to write a 'define wrapper shortcut' around Philippe> a 'with command'. Philippe> Something like: Philippe> define Lc Philippe> with language c -- $arg@ Philippe> end Philippe> But the 'define' parser seems to not understand that Philippe> a 'with' line can start an 'if' that needs a Philippe> corresponding 'end'. I'm surprised "with if" is intended to work, but if it is, then that's just a bug. If it needs special handling for "if" it will probably also need it for the other multi-line commands. Philippe> Alternatively, we should allow alias to accept 'arguments': Philippe> Instead of: Philippe> (gdb) alias Lc =3D with language c -- Philippe> Invalid command to alias to: with language c -- I think that would be a reasonable addition. I was surprised this wasn't done initially. Philippe> I have in a corner a patch that allows to add default arguments to Philippe> a command or an alias, which gives more or less the above, but us= ing Philippe> 2 successive actions: Philippe> (gdb) alias bt2 =3D bt Philippe> (gdb) help add-args=C2=A0 Philippe> Specify additional arguments to preprend to user provided comma= nd arguments. Philippe> Usage:=C2=A0=C2=A0add-args COMMAND [=3D ADDITIONAL_ARGS...] Philippe> Allows to specify or clear the additional arguments automatical= ly Philippe> prepended to the user provided arguments when COMMAND is run. I am not so sure about this. It seems pretty obscure. Maybe a more gdb-ish way of doing this would be to introduce "set" parameters to control the defaults of the relevant commands. Philippe> So, maybe I should finalize an RFA for this add-args idea in pref= erence Philippe> to the 'alias argument idea' and/or to the '$arg@' idea. I'm also not sure about the $arg@ idea, or maybe just the spelling of it. Tom