From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30283 invoked by alias); 30 Dec 2009 20:43:23 -0000 Received: (qmail 30273 invoked by uid 22791); 30 Dec 2009 20:43:22 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Dec 2009 20:43:16 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0KVH00K00G5ANZ00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 30 Dec 2009 22:43:07 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.222.44]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KVH00GYRG7UX9B0@a-mtaout21.012.net.il>; Wed, 30 Dec 2009 22:43:07 +0200 (IST) Date: Wed, 30 Dec 2009 20:43:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 0/2] Support the new PPC476 processor In-reply-to: <200912300112.13363.bauerman@br.ibm.com> To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com, tyrlik@us.ibm.com Reply-to: Eli Zaretskii Message-id: <831vicdwd0.fsf@gnu.org> References: <200912161847.17162.sergiodj@linux.vnet.ibm.com> <83y6l060qp.fsf@gnu.org> <200912300112.13363.bauerman@br.ibm.com> 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: 2009-12/txt/msg00452.txt.bz2 > From: Thiago Jung Bauermann > Date: Wed, 30 Dec 2009 01:12:13 -0200 > Cc: luisgpm@linux.vnet.ibm.com, tyrlik@us.ibm.com > > > > - Available GDB commands: [r|a]watch (rwatch/awatch/watch) > > > or [r|a]watch if == <4-bytes unsigned constant> > > > > > > - Usage example: awatch i / rwatch *0xbffff8e8 / watch i if i == 28 > > > > Will GDB decide automatically whether to use hardware-accelerated > > conditions or the current implementation, whereby an unconditional > > hardware watchpoint is set, and when it breaks, GDB itself evaluates > > the condition? I think this should be done automatically. > > Yes, GDB will use hardware-accelerated conditions automatically, when > available on the target. That's good to hear, thanks. > watch-range addr, +len What would be the use-case for watching a range of addresses that is not an integral multiple of a variable's size? > > > - Available GDB commands: hbreak-range : > > +> where <= / hbreak-range > > > : > > > > > > - Usage example: hbreak-range 0x10000658,0x10000660 / hbreak-range > > > 0x10000658,+8 / hbreak-range 20,30 > > > > Again, what are the use-cases where such breakpoints would be useful? > > They don't seem to be useful for C-level debugging, but can be for assembly- > level debugging. For instance, if you have a block of code that has more than > one entrypoint and therefore you don't know where it will get jumped into, you > can put a ranged breakpoint to cover the entire block. Thanks for the explanations. I think we should emulate this on architectures that don't have this in hardware (it doesn't sound hard).