From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1984 invoked by alias); 9 Sep 2008 12:17:30 -0000 Received: (qmail 1973 invoked by uid 22791); 9 Sep 2008 12:17:29 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 Sep 2008 12:16:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E83ED1018E; Tue, 9 Sep 2008 12:16:39 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id C738D10140; Tue, 9 Sep 2008 12:16:39 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Kd298-00067c-Tc; Tue, 09 Sep 2008 08:16:38 -0400 Date: Tue, 09 Sep 2008 12:17:00 -0000 From: Daniel Jacobowitz To: David Daney Cc: gdb@sourceware.org Subject: Re: Adding watchpoint functions to target vector vs. TARGET*WATCHPOINT macros Message-ID: <20080909121638.GA23510@caradoc.them.org> Mail-Followup-To: David Daney , gdb@sourceware.org References: <48C60739.8070000@avtrex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48C60739.8070000@avtrex.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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: 2008-09/txt/msg00052.txt.bz2 On Mon, Sep 08, 2008 at 10:18:49PM -0700, David Daney wrote: > Daniel pointed out that all the watch related functions could be added > directly to the target vector instead of writing target specific > TARGET*WATCHPOINT macros. While this is true, there is a small drawback. > > The target vector is not installed until the inferior is started, so any > watches added before this happens end up being soft-watches. While this is true, it is a general limitation of GDB and is much less of a problem than the ones associated with the macros; please use the target vector. > Ideally in when the first resume() is issued to the inferior the > watchpoints would be re-evaluated to see if some (or all) of them could > be converted to hardware watchpoints. There might have to be an > additional target hook to allow for this. Right now there's never conversion from software to hardware watchpoints. But I think this would be reasonable to do. -- Daniel Jacobowitz CodeSourcery