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 051393858C1F for ; Thu, 13 Jul 2023 11:06:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 051393858C1F 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 1qJu9T-0006ww-H4; Thu, 13 Jul 2023 07:06:27 -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=I0ovDYSAfoqDXLUffozseUC7iOrCStLqPVopBzzgR4s=; b=SHONoDBqWWvT 7be1EJpvWNal1QM279PuWAb+hjHOIbA7lY/Po0+ZIWhamml+PO69+Dk7h6/8QBp5p/cngM8ThXU6p gLG8pJHBkqaj5g4naNeMcvw3qYh+lUSB4wFIjHhfR8bNk87GonbO3XzZwaofAuA5FPzazUjdbTqCQ FYjCfQ3qnOQShEo9YMGgaB5jw5C2Bint5gaDqgTvec6lYpj3C8vnFipb9ZZUaNHKBCAJwSJ5xa191 94tN68eslLM1YELd6aXHvWKd0lWrsI7tYH/m5RT5CiXtTImFJSZu1BW+srgQawHk6WG1sFzQ1XGmj YvSfAPUBlLEjQCwP/EXb0w==; 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 1qJu9R-0006Yk-Vo; Thu, 13 Jul 2023 07:06:26 -0400 Date: Thu, 13 Jul 2023 14:06:43 +0300 Message-Id: <831qhc5av0.fsf@gnu.org> From: Eli Zaretskii To: Bruno Larsen Cc: gdb-patches@sourceware.org In-Reply-To: <20230713102411.2279542-4-blarsen@redhat.com> (message from Bruno Larsen via Gdb-patches on Thu, 13 Jul 2023 12:24:10 +0200) Subject: Re: [PATCH v4 3/4] gdb/cli: Improve UX when using list with no args References: <20230713102411.2279542-1-blarsen@redhat.com> <20230713102411.2279542-4-blarsen@redhat.com> X-Spam-Status: No, score=1.7 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 List-Id: > Cc: Bruno Larsen > Date: Thu, 13 Jul 2023 12:24:10 +0200 > From: Bruno Larsen via Gdb-patches > > When using "list" with no arguments, GDB will first print the lines > around where the inferior is stopped, then print the next N lines until > reaching the end of file, at which point it wanrs the user "Line X out > of range, file Y only has X-1 lines.". This is usually desireable, but > if the user can no longer see the original line, they may have forgotten > the current line or that a list command was used at all, making GDB's > error message look cryptic. It was reported in bugzilla as PR cli/30497. > > This commit improves the user experince by changing the behavior of > "list" slightly when a user passes no arguments. It now prints that the > end of the file has been reached and recommends that the user use the > command "list ." instead. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30497 > --- > gdb/NEWS | 5 +++++ > gdb/cli/cli-cmds.c | 17 +++++++++++++---- > gdb/doc/gdb.texinfo | 4 +++- > gdb/source.c | 16 ++++++++++++++++ > gdb/source.h | 7 +++++++ > gdb/testsuite/gdb.base/list.exp | 8 ++++---- > 6 files changed, 48 insertions(+), 9 deletions(-) Thanks, the documentation parts are okay. Reviewed-By: Eli Zaretskii