Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Multiple locations vs. watchpoints.
@ 2003-10-30  5:53 Daniel Jacobowitz
  2003-10-30  6:21 ` Eli Zaretskii
  2003-10-30  6:25 ` Peter Barada
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-10-30  5:53 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-30 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30  5:53 Multiple locations vs. watchpoints Daniel Jacobowitz
2003-10-30  6:21 ` Eli Zaretskii
2003-10-30 19:40   ` Andrew Cagney
2003-10-30 19:44   ` Daniel Jacobowitz
2003-10-30 20:39     ` Eli Zaretskii
2003-10-30  6:25 ` Peter Barada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox