From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id 16F23385AE78 for ; Thu, 23 Jun 2022 16:21:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16F23385AE78 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Paa-0001EI-KQ; Thu, 23 Jun 2022 12:21:52 -0400 Received: from [87.69.77.57] (port=4765 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4Paa-0005FS-3d; Thu, 23 Jun 2022 12:21:52 -0400 Date: Thu, 23 Jun 2022 19:21:44 +0300 Message-Id: <835ykre4fb.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: (message from Andrew Burgess via Gdb-patches on Thu, 23 Jun 2022 17:05:14 +0100) Subject: Re: [PATCH 7/9] gdb/doc: update syntax of -data-disassemble command arguments References: X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Thu, 23 Jun 2022 16:21:54 -0000 > Date: Thu, 23 Jun 2022 17:05:14 +0100 > From: Andrew Burgess via Gdb-patches > Cc: Andrew Burgess > > The argument documentation looks like this: > > -data-disassemble > [ -s @var{start-addr} -e @var{end-addr} ] > | [ -a @var{addr} ] > | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ] > -- @var{mode} > > However, I believe, according to the 'Notation and Terminology' > section, this means that the there are 3 optional location > specification argument groups for the command, followed by a > non-optional '-- mode'. > > However, this is not true, one of the location specification must be > given, i.e. we can't choose to give NO location specification, which > is what the above implies. I don't believe we ever used this convention this rigorously. But I agree that it is better to be as accurate as possible. > I propose that we change this to instead be: > > -data-disassemble > ( -s @var{start-addr} -e @var{end-addr} > | -a @var{addr} > | -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ) > -- @var{mode} > > By placing all the location specifications within '( ... )' we > indication that these are a group, from which one of the options, > separated by '|', must be selected. According to "Notation and Terminology", the (...) construct should be followed by either * or +, so I think you should use + here. Otherwise, this is fine, thanks.