This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Multiple locations vs. watchpoints.
- From: Peter Barada <peter at baradas dot org>
- To: drow at mvista dot com
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 30 Oct 2003 01:25:38 -0500 (EST)
- Subject: Re: Multiple locations vs. watchpoints.
- References: <20031030055345.GA7588@nevyn.them.org>
>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