From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9762 invoked by alias); 30 Oct 2003 06:25:39 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9755 invoked from network); 30 Oct 2003 06:25:39 -0000 Received: from unknown (HELO baradas.org) (66.166.225.55) by sources.redhat.com with SMTP; 30 Oct 2003 06:25:39 -0000 Received: by baradas.org (Postfix, from userid 500) id 9FDA29899D; Thu, 30 Oct 2003 01:25:38 -0500 (EST) From: Peter Barada To: drow@mvista.com Cc: gdb@sources.redhat.com In-reply-to: <20031030055345.GA7588@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 30 Oct 2003 00:53:45 -0500) Subject: Re: Multiple locations vs. watchpoints. References: <20031030055345.GA7588@nevyn.them.org> Message-Id: <20031030062538.9FDA29899D@baradas.org> Date: Thu, 30 Oct 2003 06:25:00 -0000 X-SW-Source: 2003-10/txt/msg00331.txt.bz2 >But suppose we have this: >foo.c:static int *bar; >bar.c:static int *bar; > >(gdb) watch *bar > > >It watches whatever *bar would print, which is one of them. No easy way to >get at the other or describe the ambiguity. I wonder once again whether the >two-level scheme is really correctly designed; but I have no better ideas. You should be able to specify 'watch func::*bar' where func is the name of a function that has scope on the *bar you are interested in. I haven't tried this myself, but 'p/x func::foo' is something I've done too many times to count so reason leads me to believe that the watch command should use the same evaluator, right? -- Peter Barada peter@baradas.org