From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2DB433856DC7 for ; Thu, 23 Jun 2022 16:05:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2DB433856DC7 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-153-VEx1OvspM9a_PBC3EaCK1A-1; Thu, 23 Jun 2022 12:05:35 -0400 X-MC-Unique: VEx1OvspM9a_PBC3EaCK1A-1 Received: by mail-wr1-f69.google.com with SMTP id e21-20020adfa455000000b0021b80b12356so4245482wra.5 for ; Thu, 23 Jun 2022 09:05:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sCDKFIYjK39exFGi1Ce00fUU93wJNqPx9NGp72/ufBc=; b=QOc2Gqf58rzZdGTj1KP07xKIDGRh6PhggILUV747UPrqh7SKRhzAkFmvFxblwTu7fV Ezoxtq5dTw0Z1UvKZsp0NqTSGSjnfNEwd+D8VUBS78xD8dMTcVYr71k+GWzaixq+NWev VMPm7HJByrQSzLWSL9syKk1y69UR5QptwHaXiKdi3Sr/tGTm5iJnVZkL2qFxdyYGqzEG AmwFYufdAFSwaooWfTgKxJG5d6OdsSUEluNbaZPv4Rlr1Cwm+mgloos6l4WPM5U/TiU0 drHZX2hiVLiw7QD39ecSoqTeSowBkIV5EuvG45Yte4mEbA5YM4OB7e0gji1NEfFdfdpN 0zlg== X-Gm-Message-State: AJIora/sns368MIqFXcTXdBTIAi/jvtP4PxJHemOmnlHzAXWg2lnlbju TLXlw4AksRgRCTV1dFzjgEE8qHvDQtEiA4Zbqsj8fpNGy6zN4VnjpLkxKRHm3G5y3CzgF/Shz3N 4wTeKVmFJrfGUmv42sWzk3pR2s+IhmhSGgXu38tMUGFcHB0Zu5GFg4e/txkfeY6q2Is2z9bpTQw == X-Received: by 2002:a5d:6d8b:0:b0:21b:9814:793d with SMTP id l11-20020a5d6d8b000000b0021b9814793dmr9072672wrs.344.1656000334477; Thu, 23 Jun 2022 09:05:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sNpsriBLpfv+zBuzoJCTsnlmkB8W9Lm2TOlXcsWZgRKI41RNnIRHUH8r9GbnGByNGNd+ytqg== X-Received: by 2002:a5d:6d8b:0:b0:21b:9814:793d with SMTP id l11-20020a5d6d8b000000b0021b9814793dmr9072602wrs.344.1656000333760; Thu, 23 Jun 2022 09:05:33 -0700 (PDT) Received: from localhost ([195.213.152.79]) by smtp.gmail.com with ESMTPSA id a25-20020a1cf019000000b0039c4b518df4sm4435879wmb.5.2022.06.23.09.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 09:05:33 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 7/9] gdb/doc: update syntax of -data-disassemble command arguments Date: Thu, 23 Jun 2022 17:05:14 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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:05:38 -0000 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 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. This change is important because, in a later commit, I want to add additional optional arguments to the -data-disassemble command, and things start to get confusing with the original syntax. --- gdb/doc/gdb.texinfo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index b0624afce2f..ca9d29bd364 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -34384,9 +34384,9 @@ @smallexample -data-disassemble - [ -s @var{start-addr} -e @var{end-addr} ] - | [ -a @var{addr} ] - | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ] + ( -s @var{start-addr} -e @var{end-addr} + | -a @var{addr} + | -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ) -- @var{mode} @end smallexample -- 2.25.4