From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id BVsWAgqy02VrFSQAWB0awg (envelope-from ) for ; Mon, 19 Feb 2024 14:54:50 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=CqTlTn3X; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E9EF21E0D2; Mon, 19 Feb 2024 14:54:49 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AE5861E030 for ; Mon, 19 Feb 2024 14:54:47 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 019E33858C60 for ; Mon, 19 Feb 2024 19:54:47 +0000 (GMT) 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 9C0DF3858D35 for ; Mon, 19 Feb 2024 19:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C0DF3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C0DF3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708372462; cv=none; b=qDxkOR8bxHMkIinrrU60VzQPGsCyynosOcksqKv9j9JLROgB6AHkNRitobn/gzP/Snx2NPWTHryIOxhzltj/tRLPSQyuyz4PHE8MOploIIlzXu1Ts7dHKHXH8LUDcarhhKVj/tKZoQpXl0TKB+h/88/mz5vAGPORXgi0CzEscjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708372462; c=relaxed/simple; bh=ArLCUSdWzus65eQmFDGKWjGzIZa/bNdGpPdhKIAByic=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=DtV1tHBRCqUV7VT0XyK0n73LJdavQmr6sphN2ZRKZiGvajti/6ph5BpQxbFUaMg9+LBmXqOEsJNS1GGZxvPZxDpbe6nMpXbkLovMaUWUHyT/Y86pBOYikQKsFdzLSlLybFM/WN4OmakbPzBkXn3BVHlQmftQ/n3oKaDludpKxTY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708372460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ulOXP0SRrglkXQD3kQtg+XHz4OJU4ZL5dw9fJ0Npv3o=; b=CqTlTn3XYV56YcKcZAnMzwlc6Km5+m/KMkqLoU9bwDhggg+sYS6GbEWcggz1XeW2I/RBVn kWx0zbiSuNqqZXLrjALS8qpBZkxxyfqtK+rXkHtjmexsdlmN7YrZ+HtMxRb4oEGHko85Es Pl8IMGBsgy+hDSj2vFIggWX8i1Wnwcs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-561-Zs4hNo9yN-al3ST-jlvQnQ-1; Mon, 19 Feb 2024 14:54:16 -0500 X-MC-Unique: Zs4hNo9yN-al3ST-jlvQnQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 46DFA38135F0; Mon, 19 Feb 2024 19:54:16 +0000 (UTC) Received: from f39-zbm-amd (unknown [10.22.16.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 994CC2166B34; Mon, 19 Feb 2024 19:54:15 +0000 (UTC) Date: Mon, 19 Feb 2024 12:54:13 -0700 From: Kevin Buettner To: Tiezhu Yang Cc: gdb-patches@sourceware.org, Tom Tromey , Guinevere Larsen Subject: Re: [PATCH v3] gdb: Modify the output of "info breakpoints" and "delete breakpoints" Message-ID: <20240219125413.590cbf7f@f39-zbm-amd> In-Reply-To: <20240219075230.23058-1-yangtiezhu@loongson.cn> References: <20240219075230.23058-1-yangtiezhu@loongson.cn> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 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_NONE, RCVD_IN_MSPIKE_H2, 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On Mon, 19 Feb 2024 15:52:30 +0800 Tiezhu Yang wrote: > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 5f05657a8b3..8215290a13c 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -7080,9 +7080,9 @@ breakpoint_1 (const char *bp_num_list, bool show_internal, > if (!filter) > { > if (bp_num_list == NULL || *bp_num_list == '\0') > - uiout->message ("No breakpoints or watchpoints.\n"); > + uiout->message ("No breakpoints, watchpoints, tracepoints, or catchpoints.\n"); The GDB coding standard specifies an 80 column limit for all source files except for .exp files. Therefore, I suggest breaking the line above as follows: uiout->message ("No breakpoints, watchpoints, tracepoints, " "or catchpoints.\n"); The coding standard can be found here: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards > else > - uiout->message ("No breakpoint or watchpoint matching > '%s'.\n", > + uiout->message ("No breakpoint, watchpoint, tracepoint, > or catchpoint matching '%s'.\n", bp_num_list); Likewise, with respect to line length. [...] > @@ -12711,7 +12711,7 @@ delete_command (const char *arg, int from_tty) > > /* Ask user only if there are some breakpoints to delete. */ > if (!from_tty > - || (breaks_to_delete && query (_("Delete all breakpoints? ")))) > + || (breaks_to_delete && query (_("Delete all breakpoints, watchpoints, tracepoints, and catchpoints? ")))) Likewise. (For this one, you might also consider moving the '&&...' portion to a new line.) [...] > @@ -14830,7 +14830,7 @@ This command may be abbreviated \"disable\"."), > Delete all or some breakpoints.\n\ > Usage: delete [BREAKPOINTNUM]...\n\ > Arguments are breakpoint numbers with spaces in between.\n\ > -To delete all breakpoints, give no argument.\n\ > +To delete all breakpoints, watchpoints, tracepoints, and catchpoints, give no argument.\n\ I think Eli mentioned this one in his review. This line needs to be split so that it's no longer than 80 characters. > \n\ > Also a prefix command for deletion of other GDB objects."), > &deletelist, 1, &cmdlist); > @@ -14841,7 +14841,7 @@ Also a prefix command for deletion of other GDB objects."), > Delete all or some breakpoints or auto-display expressions.\n\ > Usage: delete breakpoints [BREAKPOINTNUM]...\n\ > Arguments are breakpoint numbers with spaces in between.\n\ > -To delete all breakpoints, give no argument.\n\ > +To delete all breakpoints, watchpoints, tracepoints, and catchpoints, give no argument.\n\ Likewise. > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo I'm skipping the texinfo file since that's Eli's area... [...] > diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c > index 0adaa6dbed6..52057c25f89 100644 > --- a/gdb/ppc-linux-nat.c > +++ b/gdb/ppc-linux-nat.c > @@ -2358,7 +2358,7 @@ ppc_linux_nat_target::can_use_watchpoint_cond_accel (void) > > auto process_it = m_process_info.find (inferior_ptid.pid ()); > > - /* No breakpoints or watchpoints have been requested for this process, > + /* No breakpoints, watchpoints, tracepoints, or catchpoints have been requested for this process, > we have at least one free DVC register. */ Adjust this comment so that the it doesn't exceed the 80 column limit. [...] > diff --git a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp > index e2c89b879ad..84b3806d234 100644 > --- a/gdb/testsuite/gdb.arch/i386-dr3-watch.exp > +++ b/gdb/testsuite/gdb.arch/i386-dr3-watch.exp > @@ -76,7 +76,7 @@ gdb_test_multiple "watch gap1" "$test" { > gdb_test "delete" \ > "" \ > "delete all watchpoints" \ > - {Delete all breakpoints\? \(y or n\) $} \ > + {Delete all breakpoints, watchpoints, tracepoints, and catchpoints\? \(y or n\) $} \ FYI, things like this are okay since they're in .exp files. But if you see a way to shorten it without making it less readable, I encourage you to do so. I won't comment on the other long lines in .exp files... Kevin