From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86441 invoked by alias); 17 Apr 2019 20:59:26 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 86429 invoked by uid 89); 17 Apr 2019 20:59:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=ring, bell, answer X-HELO: mailsec106.isp.belgacom.be Received: from mailsec106.isp.belgacom.be (HELO mailsec106.isp.belgacom.be) (195.238.20.102) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Apr 2019 20:59:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1555534763; x=1587070763; h=message-id:subject:from:to:date:in-reply-to:references: mime-version:content-transfer-encoding; bh=fMG4cCfkPQDgH9TbF70NbAjE9CFck6FyV4lviAF+xuY=; b=ZNGV6msDxAW3M6lVr2/FO7GFn5fWpv3OOg0h5RLOv8xn+DTB2VSK0UqR 6Ul9/RhYqJn5Hovs+awOw8DeWffLmw==; Received: from 45.123-131-109.adsl-dyn.isp.belgacom.be (HELO md) ([109.131.123.45]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 17 Apr 2019 22:59:20 +0200 Message-ID: <1555534760.6208.6.camel@skynet.be> Subject: Re: / (slash) command : fast way to temporarily change setting(s) to run a command From: Philippe Waroquiers To: Kevin Buettner , gdb@sourceware.org Date: Wed, 17 Apr 2019 20:59:00 -0000 In-Reply-To: <20190417011403.6072c4b3@f29-4.lan> References: <1555313564.1473.2.camel@skynet.be> <20190417011403.6072c4b3@f29-4.lan> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00014.txt.bz2 On Wed, 2019-04-17 at 01:14 -0700, Kevin Buettner wrote: > My first reaction to this proposal was that '/' is already used in > some commands to modify their behavior. E.g. "print", "display", and > "x" all use /FMT to change the way that data is formatted. > > That said, '/' seems to be used in only a handful of commands. It > may be that its use is confined to the ones already mentioned. > > I see that the "interrupt" command allows the use of -a to modify > its behavior. Most commands have no modifiers at all. > > I don't have a serious objection to Philippe's proposal, but I do > think that we ought to consider whether use of '/' in this context > might be confusing to the user. Might some other character or command > name be less confusing? I don't know the answer to this, but I do > think it's something which should be pondered before making this > proposal a part of GDB's CLI. Yes, for sure, getting the user interface correct is critical: it is always possible to improve the implementation/code in the next release, but changing the user interface in a next release is a lot more difficult. Maybe we need to identify first what kind of confusion can happen with the '/' command ? In fact, one of the reasons I started with '/' is that I find this easy to remember and not confusing, as '/' is already used to indicate 'some options or settings' in various GDB commands. I did not want to use '-' as today, the '-' options of commands that use this cannot be combined, while the / options can (both in the slash command, and in commands that use / as option such as print). We could use another character, e.g. ':', but other characters IMO do not ring a bell that it is related to settings or options. If really we need to use another character, of course, the code to change is quite trivial (mostly name changes, as currently, many variables and args are called 'slash_...'). But / seems a reasonable (the best?) option :) Thanks Philippe