From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sIlrGQ9NJWRU+h0AWB0awg (envelope-from ) for ; Thu, 30 Mar 2023 04:49:19 -0400 Received: by simark.ca (Postfix, from userid 112) id 65FE81E223; Thu, 30 Mar 2023 04:49:19 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=RG0fC1EQ; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 11FD01E0D2 for ; Thu, 30 Mar 2023 04:49:19 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14D0F3858404 for ; Thu, 30 Mar 2023 08:49:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14D0F3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680166158; bh=+EqGJ18zpdTEZDCeSJBkP7m/k7rbIcjVBfjyR5ys1Ng=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=RG0fC1EQS0grEKBpICV/lufwzosJenRAGHZ49dlXBcUj3jEFy5OFn3KiV3GpMBc4D QoKd727/YEx28wo4WcXDKNggssA7v3eT5BX5inWHEECh24DS2tTw+kXzlf+W7knW5Q u4uGJ/LvJ+CrMO+/FdLXM19dl2I9jXk+5AdsCtaw= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id D06A53858CDA for ; Thu, 30 Mar 2023 08:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D06A53858CDA Received: from octopus (cust120-dsl54.idnet.net [212.69.54.120]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id AC09D89EA6; Thu, 30 Mar 2023 08:48:55 +0000 (UTC) Date: Thu, 30 Mar 2023 09:48:50 +0100 To: Andrew Burgess Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: warn when converting h/w watchpoints to s/w Message-ID: <20230330084850.i62rd5kbd7wfcqo6@octopus> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 30 Mar 2023 08:48:56 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Andrew Thanks for doing this, I find this gives useful information to the user. When applying the patch I see: Applying: gdb: warn when converting h/w watchpoints to s/w .git/rebase-apply/patch:197: indent with spaces. gdb_test "watch local_a" \ .git/rebase-apply/patch:208: indent with spaces. gdb_test "watch local_a + ival5" \ .git/rebase-apply/patch:218: indent with spaces. gdb_test "watch static_b" \ .git/rebase-apply/patch:286: indent with spaces. "watch ival3 if count > 1 thread 1 \r\nWatchpoint \[0-9\]*: ival3.*" \ warning: 4 lines add whitespace errors. > diff --git a/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c > new file mode 100644 > index 00000000000..37aa0f63936 > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.c > @@ -0,0 +1,35 @@ > +/* This testcase is part of GDB, the GNU debugger. > + > + Copyright 2023 Free Software Foundation, Inc. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +struct struct_type > +{ > + unsigned long long array[100]; > +}; > + > +struct struct_type global_var; > + > +int > +foo (void) > +{ > + return 0; > +} I do not think this `foo' function is needed here. The test passes without it with main just returning 0. > + > +int > +main () > +{ > + return foo (); > +} Best, Lancelot.