From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1417 invoked by alias); 14 Jun 2006 02:52:01 -0000 Received: (qmail 1405 invoked by uid 22791); 14 Jun 2006 02:52:00 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 14 Jun 2006 02:51:57 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FqLTz-000827-JJ; Tue, 13 Jun 2006 22:51:51 -0400 Date: Wed, 14 Jun 2006 02:52:00 -0000 From: Daniel Jacobowitz To: Wu Zhou Cc: Eli Zaretskii , nathan@codesourcery.com, gdb-patches@sourceware.org Subject: Re: adjust watchpoint testing Message-ID: <20060614025151.GB30789@nevyn.them.org> Mail-Followup-To: Wu Zhou , Eli Zaretskii , nathan@codesourcery.com, gdb-patches@sourceware.org References: <4489E0D8.2000702@codesourcery.com> <448D98E7.7030806@codesourcery.com> <448E59AE.50507@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00213.txt.bz2 On Wed, Jun 14, 2006 at 09:21:52AM +0800, Wu Zhou wrote: > > On Tue, 13 Jun 2006, Eli Zaretskii wrote: > > > > Date: Tue, 13 Jun 2006 14:43:13 +0800 (CST) > > > From: Wu Zhou > > > cc: gdb-patches@sourceware.org > > > > > > Do you mean to hard-wire the number of the hw watchpoint the underlying target > > > support into these base board files, or just set the number to 1? > > > > > > I guess that we might need to work out a way to detect the number > > > automatically. Any thought? > > > > I don't think there's any practical way to detect the number of > > supported watchpoints. It depends on the particulars of the watched > > regions, and different targets have different peculiarities. For > > example, x86 can set an unlimited number of watchpoints provided that > > they watch the same address and length. I'm not entirely sure why this would be specific to x86. The x86-specific code handles it, but any other target could too (I'd rather it were handled at a higher layer, but the current breakpoint.c layer is too high for that; there may be a middle layer someday; we've discussed this recently, I think.) > What about adding a gdbarch specific member function to do this? If this > is still target dependent, we can overwrite it in the relevant tdep file. The problem is that it is not architecture-specific, but board-specific. I think that, if someone wanted, we could write a features description which explained what hardware watchpoint and breakpoint resources were available. While there are quite a variety of types in existance, they follow some basic templates, which could be stored in GDB. I spoke briefly with Nathan about this earlier. My general opinion is that it's a big project with relatively little return, so until I have a target board where it would be particularly valuable, I'm not planning to think about it too hard. But if anyone else thinks this sounds like an interesting project, and wants to learn a whole lot about the different sorts of watchpoints out there and about XML schemas, ask me about it and I'll try to put my thoughts in order :-) -- Daniel Jacobowitz CodeSourcery