From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32767 invoked by alias); 10 Mar 2011 11:34:42 -0000 Received: (qmail 32639 invoked by uid 22791); 10 Mar 2011 11:34:41 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 11:34:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id ECBF02BB036; Thu, 10 Mar 2011 06:34:34 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dG3QnH7Ezogd; Thu, 10 Mar 2011 06:34:34 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3F49F2BB029; Thu, 10 Mar 2011 06:34:34 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id ECF911459AD; Thu, 10 Mar 2011 15:34:21 +0400 (RET) Date: Thu, 10 Mar 2011 11:34:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: Jan Kratochvil , robertsong.japan@gmail.com, gdb@sourceware.org Subject: Re: Why no hwatch command in gdb ? Message-ID: <20110310113421.GV19402@adacore.com> References: <20110310081154.GA13603@host1.jankratochvil.net> <20110310103409.GA29242@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00071.txt.bz2 > If you expect GDB to know up front that they are too many, this is > hard to impossible with today's architecture, because only when the > watchpoints are inserted by the target, it is possible to know whether > there are enough resources for that. > > (At least that's how things were back when I hacked x86 watchpoints.) I've always been confused by the way watchpoints are supported in GDB, depending on the target platform, etc. I think there was a recent change that made us insert the watchpoint immediately, as a way to check whether we have resources or not. I don't know how much this helps in practice. -- Joel