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 6CF8A3858D28 for ; Wed, 21 Jun 2023 12:44:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CF8A3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.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 1qBxC4-0006Rr-00; Wed, 21 Jun 2023 08:44:16 -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=7WUc/C2d4Mwdu1mAkCOIUdFyWGcyUUaqJ8ehbWzCdk8=; b=Ur9ZabWobxaW IulY/OwFplnnVkevB6AKjwZEAJu7jf7/gXaG+ICulL3o/1ATICF1bppgtSgP+gVn75Z2XoR5S8N8i P4UpsRWUIMAz6x8EUw/OIM04iHvyMD6n6K5p2mUHeBVPtmCBSRmdYSxU6VWMJHwf8ZPUn+aEvQlP8 DQUsKjWCxH2Ln3pgrrC7yql9ENesPPLLbzhgQtRRJ4xVE6ASdMX1lUY7J0Src4Ci87HfCXGDjII3T HRt+Rvn2J8ieTZ7Yk0EueJAxzQ974/qALJOq6+hLouhkyjqQ4SJzsrFurOPz6kwAQt6xh2kRoBZpw gsw8AaWzaE7GPE7MpMDxuQ==; Received: from [87.69.77.57] (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 1qBxC3-0002Qm-FI; Wed, 21 Jun 2023 08:44:15 -0400 Date: Wed, 21 Jun 2023 15:44:22 +0300 Message-Id: <83352l56jd.fsf@gnu.org> From: Eli Zaretskii To: Bruno Larsen Cc: gdb-patches@sourceware.org In-Reply-To: (message from Bruno Larsen on Wed, 21 Jun 2023 13:20:54 +0200) Subject: Re: [PATCH v3 4/4] gdb/doc: document '+' argument for 'list' command References: <20230621104545.2530552-1-blarsen@redhat.com> <20230621104545.2530552-5-blarsen@redhat.com> <838rcd5arg.fsf@gnu.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,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 List-Id: > Date: Wed, 21 Jun 2023 13:20:54 +0200 > Cc: gdb-patches@sourceware.org > From: Bruno Larsen > > On 21/06/2023 13:13, Eli Zaretskii wrote: > >> \"list .\" lists ten lines arond where the inferior is stopped.\n\ > >> +\"list +\" lists the ten lines following a previous ten-line listing.\n\ > >> \"list -\" lists the ten lines before a previous ten-line listing.\n\ > >> One argument specifies a line, and ten lines are listed around that line.\n\ > >> Two arguments with comma between specify starting and ending lines to list.\n\ > > This part is OK. > > > >> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > >> index e4e374d138c..f9c3c90e16a 100644 > >> --- a/gdb/doc/gdb.texinfo > >> +++ b/gdb/doc/gdb.texinfo > >> @@ -9149,6 +9149,10 @@ Stack}), this prints lines centered around that line. If no > >> @code{list} command has been used and no solitary line was printed, > >> it prints the lines around the function @code{main}. > >> > >> +@item list + > >> +Same as using with no arguments, but errors out if the line is > >> +past the end of the file. > > But here it looks like some copy/pasta error? > > > No, this is the main distinguishing feature between "list" and "list +", > the latter will error out if it is past the end of the file, while the > former won't. But then these two descriptions of "list +" describe two seemingly-different behaviors: "list +" lists the ten lines following a previous ten-line listing. vs @item list + Same as using with no arguments, but errors out if the line is past the end of the file. Or what am I missing?