From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 0EA553858D33 for ; Sat, 20 Apr 2024 09:44:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0EA553858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0EA553858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713606274; cv=none; b=XZmPBIH+E3SN+u+uHmgtKblJXkjWnNgd1ZHRar4jkdO4wVbab7ah2KlVM4V4f8WbFmFV95mheg/miivsgwknRBkVN2ucBO38jEQV8z9v4ykzb9E2gpt9lLuo+1814ehe46e3Oj5Dh5ZNtcxUErJsSy5yEo5g5ZK47fsVpSV1U90= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713606274; c=relaxed/simple; bh=tsyPYo6UGLSoKqUZEn0N0vy9IlRWRL5JxI75mdBmXSw=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=ENakTFjk4egjaWxF5mj7MgMCTfBHgoBOyz9Sd5156ErZhPR3MhvunTRehpXQH5+4lJrlj9AqM5ua+5ATmxWWwh5w3VJJakNAbXhzsSYfGTHBOSspHAqneA2VzF69DDn68k5ffJaizQf6IHQIHzbx6An3Bag29MR/4psGnbx4hoc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ry7Go-0003K1-8n; Sat, 20 Apr 2024 05:44:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QflY34mQT1+eQe1EKu1TdnBHFacXpXaEiwIBKMv8CCw=; b=OLREuWzvUi38 ouOjo1mZT4GbYqBKO/TGhtDSDMpaZ1qVvGOnCoIaF9qQbwz8eZ1sRWl8ywFdwMglAkbOiSKMHPGJ/ YV24Hfn/mEVdaySla1q84yqMgYX/HtX5UPUS/tYrJKf2AKxsyf2of+9McsXndEcX1ORYf4bF/FnlT Yc3fFb5o+WD3sU+1jwuYqXBdj/fIDixs2ybi31rjxxBZ2kKri9Z9+6daQHid7iWtXEhPdIjH/tyld 9oiWN5vO17wD0FphIMshTQDmc5L7f610Mkltr8+ZXu0bqlUpNn2nmA0oyTbTLtR/EKbWb9pe+YBGy y5Ogo6jDzMyiu7P0R5Ygyw==; Date: Sat, 20 Apr 2024 12:44:20 +0300 Message-Id: <86y1988j2j.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org, aburgess@redhat.com, lsix@lancelotsix.com In-Reply-To: <33ee1a27758e76ef6c0185040bdc15e2aea8b6f2.1713603415.git.aburgess@redhat.com> (message from Andrew Burgess on Sat, 20 Apr 2024 10:10:01 +0100) Subject: Re: [PATCHv2 1/8] gdb/doc: document how filename arguments are formatted References: <33ee1a27758e76ef6c0185040bdc15e2aea8b6f2.1713603415.git.aburgess@redhat.com> X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > From: Andrew Burgess > Cc: Andrew Burgess , > Lancelot SIX , > Eli Zaretskii > Date: Sat, 20 Apr 2024 10:10:01 +0100 > > In the following commits I intend to improve GDB's filename > completion. However, how filenames should be completed is a little > complex because GDB is not consistent with how it expects filename > arguments to be formatted. > > This commit documents the current state of GDB when it comes to > formatting filename arguments. > > Currently GDB will not correctly complete filenames inline with this > documentation; GDB will either fail to complete, or complete > incorrectly (i.e. the result of completion will not then be accepted > by GDB). However, later commits in this series will fix completion. > --- > gdb/doc/gdb.texinfo | 66 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 66 insertions(+) Thanks, a few comments below. > +@node Filename Arguments > +@section Filenames As Command Arguments Perhaps add some index entry here? Like this, for example: @cindex file names, quoting and escaping > +If the filename does include whitespace, double quotes, or single > +quotes then @value{GDBN} has two approaches for how these filenames ^ A comma missing there. > +should be formatted, which format to use depends on which command is > +being used. ^ I'd replace that comma with a semi-colon. > +Alternatively the entire filename can be wrapped in quotes, in which > +case no backlsashes are needed, for example: > + > +@smallexample > +(@value{GDBP}) file "/path/with spaces/to/a file" > +@end smallexample is quoting "like this" the only supported style of quoting, or do we also support quoting 'like this'? If the latter, we should say so in the manual. I would also suggest to describe how to quote file names with embedded quote characters, instead of leaving this to the reader's imagination and creativity. Reviewed-By: Eli Zaretskii