From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4807 invoked by alias); 27 Nov 2010 15:28:20 -0000 Received: (qmail 4799 invoked by uid 22791); 27 Nov 2010 15:28:20 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Nov 2010 15:28:15 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LCJ00K00UIR3N00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 27 Nov 2010 17:26:17 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.63.39]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCJ00J16UVQNJ70@a-mtaout20.012.net.il>; Sat, 27 Nov 2010 17:26:16 +0200 (IST) Date: Sat, 27 Nov 2010 15:28:00 -0000 From: Eli Zaretskii Subject: Re: [patch 2/3] Implement support for PowerPC BookE ranged watchpoints In-reply-to: <1290864315.3009.40.camel@hactar> To: Thiago Jung Bauermann Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, jan.kratochvil@redhat.com, brobecker@adacore.com Reply-to: Eli Zaretskii Message-id: <83k4jy6b1k.fsf@gnu.org> References: <1290549100.3164.47.camel@hactar> <201011232316.56539.pedro@codesourcery.com> <1290632755.3164.94.camel@hactar> <201011251731.58135.pedro@codesourcery.com> <83k4k07324.fsf@gnu.org> <1290864315.3009.40.camel@hactar> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00467.txt.bz2 > From: Thiago Jung Bauermann > Cc: Pedro Alves , 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.