From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lRn7HONN02UNziMAWB0awg (envelope-from ) for ; Mon, 19 Feb 2024 07:47:31 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=Yvf/Td2k; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6750C1E0D2; Mon, 19 Feb 2024 07:47:31 -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 136FB1E030 for ; Mon, 19 Feb 2024 07:47:29 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2A18384D169 for ; Mon, 19 Feb 2024 12:47:26 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 5223B384F00A for ; Mon, 19 Feb 2024 12:47:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5223B384F00A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5223B384F00A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708346827; cv=none; b=mk862rIW00GRwTAwmGGT6gMZ3zmwvTPdwQFNaRK0q9Lu2evW+lqrc5YDjHonWkZj2JWtm1nKdr3C2tVjThnUBU7AEy2htVicvZTfmrQaV7x8x5HB5u/L/hr6APZcescwpFbyer0igWv2z3YtGhIuMjp///E/qNEt9brVlW1+EN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708346827; c=relaxed/simple; bh=1NbAoBGGJjslD4db18+IpmxtRLvLkk87lwkyLYSrZjs=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=INFrCIKtpWsVKJYuvuKN4XdSXNcqSdfpb0AS5fhnyHNgGMmjDe2MAqhJRxRNaaXHcxWdBbNbME3XIYujG/sCrto31BTpJpX0NV8ApOEWWsV/BeJJZgQnMNypexD/p36v9GUZXqcelfFGvU+gAhc4RhyqxCziZC3BTno6cpY/2eU= ARC-Authentication-Results: i=1; server2.sourceware.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 1rc330-00076u-D4; Mon, 19 Feb 2024 07:47:02 -0500 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=O+gDy6msNe/yQjkZz+LVBVYFhGYsiarj+pxULb2BEh0=; b=Yvf/Td2k9OSD UWBDPZKd939Vb3FKtDylwGvfJGonNgpqIz7taec9bUp84sPXZvN/fWBPOhL812SEifZtkOOK1Yo0I +Igt6TLwxXgomSWadjEYfpBI7AbHSihbgKTeOONoTu3REA/FAJL/zUKOm96kL/BrO/JPw02QFxuLz 0sznaSHHbG9rCH6u6hXSygvEiIxI0Q7ZjWVpRLFjxt3qvjAZopoTjzNLZg+F4kdi5hrR7zV9SLyAT v9DeP5d6kM5FJr181XVyRDtlkoCAAcu7uDxbdEmVd3f4MUNjCstmPKFbFZbRWTZMWjidwkGwBtT+m FShJ3rKkSaWmWa90zYsOKA==; Date: Mon, 19 Feb 2024 14:46:59 +0200 Message-Id: <86v86kpqnw.fsf@gnu.org> From: Eli Zaretskii To: Tiezhu Yang Cc: gdb-patches@sourceware.org, kevinb@redhat.com, tom@tromey.com, blarsen@redhat.com In-Reply-To: <20240219075230.23058-1-yangtiezhu@loongson.cn> (message from Tiezhu Yang on Mon, 19 Feb 2024 15:52:30 +0800) Subject: Re: [PATCH v3] gdb: Modify the output of "info breakpoints" and "delete breakpoints" References: <20240219075230.23058-1-yangtiezhu@loongson.cn> X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 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 > From: Tiezhu Yang > Cc: Kevin Buettner , Tom Tromey , > Bruno Larsen > Date: Mon, 19 Feb 2024 15:52:30 +0800 > > The output of "info breakpoints" includes breakpoint, watchpoint, > tracepoint, and catchpoint if they are created, so it should show > all the four types are deleted in the output of "info breakpoints" > to report empty list after "delete breakpoints". > > It should also change the output of "delete breakpoints" to make it > clear that watchpoints, tracepoints, and catchpoints are also being > deleted. This is suggested by Bruno Larsen, thank you. > > $ make check-gdb TESTS="gdb.base/access-mem-running.exp" > $ gdb/gdb gdb/testsuite/outputs/gdb.base/access-mem-running/access-mem-running > [...] > (gdb) break main > Breakpoint 1 at 0x12000073c: file /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c, line 32. > (gdb) watch global_counter > Hardware watchpoint 2: global_counter > (gdb) trace maybe_stop_here > Tracepoint 3 at 0x12000071c: file /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c, line 27. > (gdb) catch fork > Catchpoint 4 (fork) > (gdb) info breakpoints > Num Type Disp Enb Address What > 1 breakpoint keep y 0x000000012000073c in main at /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c:32 > 2 hw watchpoint keep y global_counter > 3 tracepoint keep y 0x000000012000071c in maybe_stop_here at /home/loongson/gdb.git/gdb/testsuite/gdb.base/access-mem-running.c:27 > not installed on target > 4 catchpoint keep y fork > > Without this patch: > > (gdb) delete breakpoints > Delete all breakpoints? (y or n) y > (gdb) info breakpoints > No breakpoints or watchpoints. > (gdb) info breakpoints 3 > No breakpoint or watchpoint matching '3'. > > With this patch: > > (gdb) delete breakpoints > Delete all breakpoints, watchpoints, tracepoints, and catchpoints? (y or n) y > (gdb) info breakpoints > No breakpoints, watchpoints, tracepoints, or catchpoints. > (gdb) info breakpoints 3 > No breakpoint, watchpoint, tracepoint, or catchpoint matching '3'. Thanks. > @@ -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\ Please make the lines in the documentation strings shorter than 80 columns, so they don't wrap. > @@ -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, > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -4343,7 +4343,7 @@ running or not, what process it is, and why it stopped. > @end table > > @menu > -* Breakpoints:: Breakpoints, watchpoints, and catchpoints > +* Breakpoints:: Breakpoints, watchpoints, tracepoints, and catchpoints Here, please wrap the part after the comma to the next line. > @@ -5650,10 +5650,10 @@ in @ref{Location Specifications}. > @kindex delete > @kindex d @r{(@code{delete})} > @item delete @r{[}breakpoints@r{]} @r{[}@var{list}@dots{}@r{]} > -Delete the breakpoints, watchpoints, or catchpoints of the breakpoint > -list specified as argument. If no argument is specified, delete all > -breakpoints (@value{GDBN} asks confirmation, unless you have @code{set > -confirm off}). You can abbreviate this command as @code{d}. > +Delete the breakpoints, watchpoints, tracepoints, or catchpoints of the breakpoint > +list specified as argument. If no argument is specified, delete all breakpoints, > +watchpoints, tracepoints, and catchpoints (@value{GDBN} asks confirmation, unless > +you have @code{set confirm off}). You can abbreviate this command as @code{d}. Please break the long lines so that they are shorter than 70 columns. Reviewed-By: Eli Zaretskii