* watch -location
@ 2012-01-22 2:45 Jed Brown
2012-01-23 21:07 ` Tom Tromey
2012-01-23 22:05 ` Sergio Durigan Junior
0 siblings, 2 replies; 3+ messages in thread
From: Jed Brown @ 2012-01-22 2:45 UTC (permalink / raw)
To: gdb
I was surprised when I upgraded to 7.3.1 that my common pattern of
(gdb) print &obj->member
$1 = (int *) 0x6fcf04
(gdb) watch *$1
was no longer watching the value at this address. I found that the
changelog mentioned the new -location option, which makes this much
nicer
(gdb) watch -location obj->member
Hardware watchpoint 3: -location obj->member
I like the new method, but why did the old method stop working? It
makes some old debugging documentation incorrect.
I currently see
(gdb) info watchpoints
Num Type Disp Enb Address What
3 hw watchpoint keep y -location obj->member
Could the address of obj->member be printed in this output? It would
be useful for me to distinguish multiple watchpoints set for members
of different objects. (I.e. I set watchpoints twice from the same
scope with the same commands, but with different values of "obj", and
I'd like to be able to distinguish which of these are related other
than to remember which numbers refer to members of which object.)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: watch -location
2012-01-22 2:45 watch -location Jed Brown
@ 2012-01-23 21:07 ` Tom Tromey
2012-01-23 22:05 ` Sergio Durigan Junior
1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2012-01-23 21:07 UTC (permalink / raw)
To: Jed Brown; +Cc: gdb
>>>>> "Jed" == Jed Brown <jed@59A2.org> writes:
Jed> I was surprised when I upgraded to 7.3.1 that my common pattern of
Jed> (gdb) print &obj->member
Jed> $1 = (int *) 0x6fcf04
Jed> (gdb) watch *$1
Jed> I like the new method, but why did the old method stop working? It
Jed> makes some old debugging documentation incorrect.
As far as I know, nothing has changed here.
If you have a reproducible test case, please file a bug.
Jed> (gdb) info watchpoints
Jed> Num Type Disp Enb Address What
Jed> 3 hw watchpoint keep y -location obj->member
Jed> Could the address of obj->member be printed in this output?
Nice idea. Could you file a (separate) bug for this as well?
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: watch -location
2012-01-22 2:45 watch -location Jed Brown
2012-01-23 21:07 ` Tom Tromey
@ 2012-01-23 22:05 ` Sergio Durigan Junior
1 sibling, 0 replies; 3+ messages in thread
From: Sergio Durigan Junior @ 2012-01-23 22:05 UTC (permalink / raw)
To: Jed Brown; +Cc: gdb
Hello Jed,
On Sunday, January 22 2012, Jed Brown wrote:
> I was surprised when I upgraded to 7.3.1 that my common pattern of
>
> (gdb) print &obj->member
> $1 = (int *) 0x6fcf04
> (gdb) watch *$1
>
> was no longer watching the value at this address.
It is working OK with me. Could you please file a bug with a
reproducer, as Tom suggested?
Thanks,
--
Sergio
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-23 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-22 2:45 watch -location Jed Brown
2012-01-23 21:07 ` Tom Tromey
2012-01-23 22:05 ` Sergio Durigan Junior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).