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 DF4F8385841D for ; Tue, 20 Jun 2023 16:20:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DF4F8385841D 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 1qBe5m-00053X-MC; Tue, 20 Jun 2023 12:20:31 -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=WwX84UM/IeMZ3nF5+4ZwUadT+fblncUpCdTdqMKKbIY=; b=pORodPkwx2q1 tyAcZ7nnjvJQEXST0Qn0K/FpjtxY02XOGwXy49EkEWqfTsjhnxJvTEPIzE2Z7Ak/8oBuNzawU/6ne j7sfKGpsAUqSWA7zB9zhmR7wEe9gGJL3KCav3eT+8ZnVAjKFdeM48zw2FNKgn/q5KN6Bk1mrqhRKh YV4tPo4XcQNthi9YrFHXrZ5WmzPcNx9qSCvOzDp0wOaUSMQQPxi6d4NvPnKphUXAZHRpFBzGwBssZ 7cV9Zy5wJU7O+DkhvmDTUkSvOmiv2LniYU3jrYR1rvV85Fw6GDuwfpvZtnLfemXTVIK5XWRN8GbqM V9ElKlOrcatH3IVwY/orCg==; 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 1qBe5m-0004ly-6K; Tue, 20 Jun 2023 12:20:30 -0400 Date: Tue, 20 Jun 2023 19:20:37 +0300 Message-Id: <83lege5cmi.fsf@gnu.org> From: Eli Zaretskii To: Bruno Larsen Cc: gdb-patches@sourceware.org In-Reply-To: <20230620155259.2476415-5-blarsen@redhat.com> (message from Bruno Larsen on Tue, 20 Jun 2023 17:53:00 +0200) Subject: Re: [PATCH v2 4/4] gdb/doc: document '+' argument for 'list' command References: <20230620155259.2476415-1-blarsen@redhat.com> <20230620155259.2476415-5-blarsen@redhat.com> 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: > From: Bruno Larsen > Cc: eliz@gnu.org, > Bruno Larsen > Date: Tue, 20 Jun 2023 17:53:00 +0200 > > The command 'list' has accepted the argument '+' for many years already, > but this option wasn't documented either in the texinfo docs or in the > help text for the command. This commit documents it. > --- > gdb/cli/cli-cmds.c | 1 + > gdb/doc/gdb.texinfo | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c > index a966142eaea..b7cbe673985 100644 > --- a/gdb/cli/cli-cmds.c > +++ b/gdb/cli/cli-cmds.c > @@ -2822,6 +2822,7 @@ and send its output to SHELL_COMMAND.")); > List specified function or line.\n\ > With no argument, lists ten more lines after or around previous listing.\n\ > \"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\ > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 102c3f3e21e..c6ecf4e938f 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 parameters, but errors out if the line is ^^^^^^^^^^^^^ "no arguments" > +past the end of the file. Thanks. Reviewed-By: Eli Zaretskii