From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20156 invoked by alias); 4 May 2011 20:31:23 -0000 Received: (qmail 20148 invoked by uid 22791); 4 May 2011 20:31:23 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 May 2011 20:31:07 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LKO00J00UACBY00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Wed, 04 May 2011 23:30:46 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.234.175]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LKO00IFWUB7INB0@a-mtaout22.012.net.il>; Wed, 04 May 2011 23:30:45 +0300 (IDT) Date: Wed, 04 May 2011 20:31:00 -0000 From: Eli Zaretskii Subject: Re: [RFA 2/3] Demote to sw watchpoint only in update_watchpoint In-reply-to: <1304536344.19357.218.camel@hactar> To: Thiago Jung Bauermann Cc: uweigand@de.ibm.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83pqnymcng.fsf@gnu.org> References: <201104291726.p3THQVaC029608@d06av02.portsmouth.uk.ibm.com> <1304398546.2245.80.camel@hactar> <1304536344.19357.218.camel@hactar> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00113.txt.bz2 > From: Thiago Jung Bauermann > Cc: uweigand@de.ibm.coma, gdb-patches@sourceware.org > Date: Wed, 04 May 2011 16:12:24 -0300 > > GDB doesn't have a command to create a hardware watchpoint or a software > watchpoint. It will decide which will be created based on what it thinks > can be done. Do you think this should be changed and there should be an > hwatch command which would fail if an hw watchpoint is not possible? Or > just that a watchpoint should never be converted between sw and hw after > they are created? It certainly is bad to have the demotion happen when you resume the inferior. Pedro's suggestion resolves this as well, because the problem will be revealed at "watch foo" time. If and when we implement that, there will be no need for "hwatch", I think, as the user will see the problem on the spot and can take corrective actions in time. > So the problem is still there. It's not better, but not worse either. > The output is slightly different because of the better error handling > this patch introduces. Thus, IMHO overhauling resources handling is not > a prerequisite or even directly related to this patch (or the next one > in the series). The acceptance or rejection of this patch is orthogonal > to that. Fair enough. I withdraw my objections to the patch. > Having said that, I agree that it's a shame that GDB can't keep track of > debug hardware availability, something that one would expect to be among > the basic tasks of a debugger. So if we can agree on how GDB should deal > with the problem, I'm willing to work on it on a best effort basis > (meaning that I wouldn't have much time to dedicate to this, but would > eventually make progress). Thank you. I think Pedro's idea is already on the table, and no one objected to it. If it is feasible, I'd say let's do it that way.