From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26958 invoked by alias); 30 Oct 2003 05:53:48 -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 26950 invoked from network); 30 Oct 2003 05:53:46 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 30 Oct 2003 05:53:46 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AF5kf-0001z6-CB for ; Thu, 30 Oct 2003 00:53:45 -0500 Date: Thu, 30 Oct 2003 05:53:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Multiple locations vs. watchpoints. Message-ID: <20031030055345.GA7588@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00329.txt.bz2 Just something I was thinking about while writing my last message... Suppose we have this: foo.c:static int *bar; (gdb) watch *bar My idea has sort of been to create a watchpoint with multiple locations, one for bar and one for *bar, each representing a conceptual hardware watchpoint (though not necessarily one hardware watchpoint resource). And for this: foo.c:static int foo() bar.c:static int foo() (gdb) break foo My idea has sort of been that we should have a breakpoint with two bp_locations, one for foo.c:foo and one for bar.c:foo. 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. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer