From: Daniel Jacobowitz <drow@false.org>
To: Wu Zhou <woodzltc@cn.ibm.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
nathan@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: adjust watchpoint testing
Date: Wed, 14 Jun 2006 02:52:00 -0000 [thread overview]
Message-ID: <20060614025151.GB30789@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0606140914210.2888@localhost.localdomain>
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 <woodzltc@cn.ibm.com>
> > > 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
next prev parent reply other threads:[~2006-06-14 2:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 20:58 Nathan Sidwell
2006-06-12 16:30 ` Wu Zhou
2006-06-12 16:40 ` Nathan Sidwell
2006-06-13 6:12 ` Wu Zhou
2006-06-13 6:23 ` Nathan Sidwell
2006-06-13 6:43 ` Wu Zhou
2006-06-13 7:07 ` Nathan Sidwell
2006-06-13 10:20 ` Wu Zhou
2006-06-13 10:25 ` Nathan Sidwell
2006-06-13 17:30 ` Eli Zaretskii
2006-06-14 1:21 ` Wu Zhou
2006-06-14 2:52 ` Daniel Jacobowitz [this message]
2006-06-14 3:32 ` Eli Zaretskii
2006-06-13 13:11 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060614025151.GB30789@nevyn.them.org \
--to=drow@false.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=nathan@codesourcery.com \
--cc=woodzltc@cn.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox