This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 2/3] Implement support for PowerPC BookE ranged watchpoints


> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org,
>         jan.kratochvil@redhat.com, brobecker@adacore.com
> Date: Sat, 27 Nov 2010 11:25:15 -0200
> 
> On Fri, 2010-11-26 at 13:10 +0200, Eli Zaretskii wrote:
> > > > So that's way I created a target_insert_ranged_watchpoint. The other
> > > > option would be to add a flag to target_insert_watchpoint...
> > > 
> > > It appears to me that if there should be a new kind of way to
> > > insert watchpoints, it should be to allow setting watchpoints
> > > that only work if the accesses are aligned
> > 
> > What would be the use-cases where such behavior would be needed?
> 
> In the case of embedded PowerPC processors, that's the only kind of
> watchpoint available using a single watchpoint register.

Okay, but I thought Pedro was suggesting to make such "aligned-access"
watchpoints available on platforms that don't have this limitation.  I
was asking why would they be useful on those other platforms.

> To create a "regular" watchpoint in that platform, you need two
> watchpoint registers, from a total of two available in the processor.

Understood.  I would then suggest a platform-specific option,
defaulting to OFF, which, when ON, would cause GDB to use 2 registers
for a watchpoint, in order to be able to catch unaligned accesses.
This is under the assumption that most use-cases want to watch
accesses to variables using the right alignment, and that therefore
using 2 registers by default would be a waste of resources that are at
premium on this platform.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]