From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27754 invoked by alias); 12 Aug 2010 08:17:51 -0000 Received: (qmail 27736 invoked by uid 22791); 12 Aug 2010 08:17:50 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Aug 2010 08:17:39 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7C8HcXt004135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 Aug 2010 04:17:38 -0400 Received: from Phil-THINK.home (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7C8HaeD016167; Thu, 12 Aug 2010 04:17:37 -0400 Message-ID: <4C63AE20.4060102@redhat.com> Date: Thu, 12 Aug 2010 08:17:00 -0000 From: Phil Muldoon User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFA: implement "watch -location" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-08/txt/msg00169.txt.bz2 On 11/08/10 23:04, Tom Tromey wrote: > This patch steals an idea from Apple's gdb fork, namely "watch -location". > I wrote this from scratch but in the end it looks pretty similar to what > they did. > > In my experience, I generally don't want gdb's scope-tracking logic for > watchpoint expressions. Instead, I'm usually just interested in some > bit of memory. I find myself typing this a lot: > > print &expr > watch *$ > > This patch adds an option to "watch" to let me do this more directly. > (FWIW, this is a frequently-asked question on #gdb.) > > I did not add an MI option for this (something Apple did do). > It didn't seem necessary to me. > > I also didn't add Python API for this. I'm on the fence about whether > it is needed. Nice patch! I guess we could get around it by massaging the data in Python before passing it as an expression to the Breakpoint API. It would be nice, however, to maintain parity with the command line. I'm on the fence too, but if you don't implement it I probably will (eventually). Cheers, Phil