Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to watch for changes in a location of memory
@ 2008-08-08  8:13 Stefano Sabatini
  2008-08-08  8:38 ` Eran Ifrah
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Sabatini @ 2008-08-08  8:13 UTC (permalink / raw)
  To: gdb Mailing List

Hi all,

I would like to check a variable in memory, I don't know in which
function is modified, so I can't do a simple watch on a variable name.

So I wonder if it is possible (gdb 6.8) to watch for a variable using
the location rather than the var name.

I'll try to express it more clearly: for example if I have a struct:
FooCtx* ctx;

containing a field foo, ctx is defined somewhere in the code, and may
be accessed from different contexts, for example:

trash->junk->ctx->foo;
bar->ctx->foo;

etc.

How can I monitor for changes in ctx->foo simply specifying its
location in memory (&ctx->foo), is it currently possible with gdb at
all?

Sorry if I overlooked something obvious.

Thanks in advance, regards.


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

end of thread, other threads:[~2008-08-08 13:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-08  8:13 How to watch for changes in a location of memory Stefano Sabatini
2008-08-08  8:38 ` Eran Ifrah
2008-08-08  9:13   ` Stefano Sabatini
2008-08-08 11:56     ` Stefano Sabatini
2008-08-08 12:42     ` Andreas Schwab
2008-08-08 12:48       ` Andreas Schwab
2008-08-09 12:03       ` Eli Zaretskii
2008-08-08 13:48         ` Eli Zaretskii
2008-08-09 12:20         ` Andreas Schwab
2008-08-09 13:49           ` Andreas Schwab
2008-08-12 14:34           ` Paul Koning
2008-08-10 21:02             ` Paul Koning

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