From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org,
Jan Kratochvil <jan.kratochvil@redhat.com>,
Joel Brobecker <brobecker@adacore.com>,
Eli Zaretskii <eliz@gnu.org>
Subject: Re: [patch 2/3] Implement support for PowerPC BookE ranged watchpoints
Date: Wed, 24 Nov 2010 21:06:00 -0000 [thread overview]
Message-ID: <1290632755.3164.94.camel@hactar> (raw)
In-Reply-To: <201011232316.56539.pedro@codesourcery.com>
On Tue, 2010-11-23 at 23:16 +0000, Pedro Alves wrote:
> On Tuesday 23 November 2010 21:51:40, Thiago Jung Bauermann wrote:
> > Ok?
>
> Apologies for jumping in so late, but, I don't think I understand
> why does the user need to know that a watchpoint is "ranged"
> or not. All (low-level) watchpoints are ranged,
Good point. At the time these patches were made, GDB didn't behave that
way, but it was fixed one year ago already[1]. I guess I just kept the
old mentality...
> and what's
> relevant here is only the width of the range the hardware can watch,
> but that is already a parameter to the target_insert_watchpoint
> method. So I guess my question is, why can't the target backend
> manage whether to use a range or "normal" watchpoint when asked to
> inserted a watchpoint? Is it the watch resource accounting done
> by breakpoint.c (which is known to be something that should just
> go away)?
Yes, the resource accounting is an issue. But also, the target needs to
know that it's being asked to watch a region which is expected to have
accesses in the middle of it. This is because of the difference of how
hardware watchpoints work in server and embedded PowerPC processors. In
the former, a hardware watchpoint triggers when any byte within an 8
byte window starting at the given address is accessed. In the latter,
only accesses at the given address trigger the watchpoint.
So for an embedded powerpc processor, it's not enough to know that it
should watch a 4 byte region at a given address. If it represents an
integer and thus it can expect accesses only at that address then a
regular watchpoint is enough. But if it's an array of four chars, then
it needs two watchpoint registers to set up a hardware watchpoint...
So that's way I created a target_insert_ranged_watchpoint. The other
option would be to add a flag to target_insert_watchpoint...
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
[1] - http://sourceware.org/ml/gdb-patches/2009-12/msg00368.html
next prev parent reply other threads:[~2010-11-24 21:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 21:52 Thiago Jung Bauermann
2010-11-23 23:17 ` Pedro Alves
2010-11-24 21:06 ` Thiago Jung Bauermann [this message]
2010-11-25 17:32 ` Pedro Alves
2010-11-26 11:09 ` Eli Zaretskii
2010-11-27 13:25 ` Thiago Jung Bauermann
2010-11-27 15:28 ` Eli Zaretskii
2010-11-26 21:15 ` Thiago Jung Bauermann
2010-11-27 17:47 ` Pedro Alves
2010-11-27 18:01 ` Pedro Alves
2010-12-09 1:44 ` Thiago Jung Bauermann
2010-12-23 19:07 ` Thiago Jung Bauermann
2010-12-23 19:13 ` Eli Zaretskii
2010-12-23 20:17 ` Thiago Jung Bauermann
2010-12-23 22:18 ` Pedro Alves
2010-12-24 5:10 ` Joel Brobecker
2010-12-25 14:13 ` Eli Zaretskii
2010-12-27 20:18 ` Thiago Jung Bauermann
2010-12-28 2:30 ` Thiago Jung Bauermann
2010-12-28 5:47 ` Joel Brobecker
2010-12-28 16:42 ` Pedro Alves
2010-12-28 16:10 ` Pedro Alves
2010-12-29 1:00 ` Thiago Jung Bauermann
2010-11-26 10:59 ` Eli Zaretskii
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=1290632755.3164.94.camel@hactar \
--to=bauerman@br.ibm.com \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=pedro@codesourcery.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