From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79982 invoked by alias); 16 Apr 2019 12:20:17 -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 79973 invoked by uid 89); 16 Apr 2019 12:20:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*u:1.3.6, H*UA:1.3.6, H*f:sk:1555397, H*r:112 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Apr 2019 12:20:15 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x3GCK8kp031806 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Apr 2019 08:20:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 954051E77E; Tue, 16 Apr 2019 08:20:08 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id AAF071E0A9; Tue, 16 Apr 2019 08:20:07 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 Apr 2019 12:20:00 -0000 From: Simon Marchi To: Philippe Waroquiers Cc: gdb@sourceware.org Subject: Re: / (slash) command : fast way to temporarily change setting(s) to run a command In-Reply-To: <1555397322.1473.10.camel@skynet.be> References: <1555313564.1473.2.camel@skynet.be> <0dd32aff-8b46-92c8-5761-6b4f72efbaf0@polymtl.ca> <1555397322.1473.10.camel@skynet.be> Message-ID: <33981fb59a1202b4e00dc7d4b5a77089@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00010.txt.bz2 On 2019-04-16 02:48, Philippe Waroquiers wrote: > On Mon, 2019-04-15 at 23:06 -0400, Simon Marchi wrote: >> Hi Philippe, >> >> I like the idea, I would probably use it most with /e (for long >> strings) and /p. >> I just tried it a little bit, and I appreciate the fact that it's easy >> to apply >> to your previous command. Just type up and add the prefix to the >> beginning of the >> line. > Interesting, that was not the primary use case I was thinking to. > > We could make this even easier by making COMMAND optional in: > Usage: /SETTING... [COMMAND] > and giving no command means to repeat the previous command with the > additional > given settings e.g. : > (gdb) some command > .... some command output > (gdb) /e > => executes /e some command > > (gdb) /e some command > ... some command output > (gdb) /p > => executes /ep some command > > I guess we probably call dont_repeat () in / command > when no COMMAND is given. Ah yeah, that sounds good too, I would be consistent with the fact that just like you can do: (gdb) p 10 $4 = 10 (gdb) p/x $5 = 0xa Does it mean that as a side-effect, "/" alone would repeat the previos command unaltered? Simon