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 738BF3858C74 for ; Thu, 13 Jul 2023 11:05:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 738BF3858C74 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 1qJu8e-0006aI-2o; Thu, 13 Jul 2023 07:05:36 -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=WUTMen5MuNL77LCo9Ub+HFALROCrZWCZ5a4vZQLhlSA=; b=GsanQaMDa+sg kVGZ9rSzdJAh0JhpILlej59k+Dne4DSK+8QqeakVCfyJdA63hn8rv+KA3wRT7Zc4J43I1/TY8hViw CzjRiZZmrhHJe9d0vTQWYnUv9NL2GN632Zwu1uSojsOTeUVtHO9M5uFN5GTST53arSc9XE00T8/Zr VV4DzPfpFkhDVQEHzQXl+6yVZdDcNcwt54gRsrXH/CBTa9inVd7QRvWrhUs+n1N4QmeLqLEcoPjYC MqtzGYmpusYujNMapQmEPJD0Ec4mQ4KGwA6W0oDBl/xEKdab3FPjfQgmO+IXj/X0u058m+po1qglU HVg96mXgoLMXaag1ywx5kA==; 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 1qJu8a-0006VF-1R; Thu, 13 Jul 2023 07:05:35 -0400 Date: Thu, 13 Jul 2023 14:05:47 +0300 Message-Id: <83351s5awk.fsf@gnu.org> From: Eli Zaretskii To: Bruno Larsen Cc: gdb-patches@sourceware.org In-Reply-To: <20230713102411.2279542-3-blarsen@redhat.com> (message from Bruno Larsen via Gdb-patches on Thu, 13 Jul 2023 12:24:09 +0200) Subject: Re: [PATCH v4 2/4] gdb/cli: add '.' as an argument for 'list' command References: <20230713102411.2279542-1-blarsen@redhat.com> <20230713102411.2279542-3-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:09 +0200 > From: Bruno Larsen via Gdb-patches > > Currently, after the user has used the list command once, there is no > self-contained way to ask GDB to print the location where the inferior is > stopped. The current best options require either using a separate > command to scope out where the inferior is stopped, or using "list *$pc" > requiring knowledge of GDB standard registers. This commit adds a way > to do that using '.' as a new argument for the 'list' command. If the > inferior isn't running, the command prints around the main function. > > Because this necessitated having the inferior running and the test was > (seemingly unnecessarily) using printf in a non-essential way and it > would make the resulting log harder to read for no benefit, it was > replaced by a differen t statement. > --- > gdb/NEWS | 4 ++++ > gdb/cli/cli-cmds.c | 31 ++++++++++++++++++++++++-- > gdb/doc/gdb.texinfo | 5 +++++ > gdb/testsuite/gdb.base/list.exp | 39 +++++++++++++++++++++++++++++++++ > gdb/testsuite/gdb.base/list1.c | 2 +- > 5 files changed, 78 insertions(+), 3 deletions(-) The documentation parts are okay, thanks. Reviewed-By: Eli Zaretskii