From: Andreas Schwab <schwab@suse.de>
To: gdb@sourceware.org
Cc: gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: How to watch for changes in a location of memory
Date: Fri, 08 Aug 2008 12:42:00 -0000 [thread overview]
Message-ID: <jezlnnoh4s.fsf@sykes.suse.de> (raw)
In-Reply-To: <20080808091156.GA8935@geppetto> (Stefano Sabatini's message of "Fri, 8 Aug 2008 11:11:56 +0200")
Stefano Sabatini <stefano.sabatini-lala@poste.it> writes:
> On date Friday 2008-08-08 10:37:50 +0200, Eran Ifrah wrote:
>> You might want to try the 'watch' command which will causes gdb to
>> break whenever the memory at a given addr has been modified
>>
>> Read here for more details:
>>
>> http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#SEC34
>
> Thank you for the good pointer, yes indeed it seems it does what I
> want, which is basically:
> watch &ctx->foo;
This is equivalent to `watch ctx', since the address of ctx->foo can
only change if ctx changes. Watching an address of something is
generally not usefull.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
WARNING: multiple messages have this Message-ID
From: Andreas Schwab <schwab@suse.de>
To: gdb@sourceware.org
Cc: gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: How to watch for changes in a location of memory
Date: Fri, 08 Aug 2008 12:48:00 -0000 [thread overview]
Message-ID: <jezlnnoh4s.fsf@sykes.suse.de> (raw)
Message-ID: <20080808124800.QlkErBQZGN5BaNwYLVfRIPtL2cH3EzrfgRb3NRuKl8I@z> (raw)
In-Reply-To: <20080808091156.GA8935@geppetto> (Stefano Sabatini's message of "Fri, 8 Aug 2008 11:11:56 +0200")
Stefano Sabatini <stefano.sabatini-lala@poste.it> writes:
> On date Friday 2008-08-08 10:37:50 +0200, Eran Ifrah wrote:
>> You might want to try the 'watch' command which will causes gdb to
>> break whenever the memory at a given addr has been modified
>>
>> Read here for more details:
>>
>> http://sources.redhat.com/gdb/current/onlinedocs/gdb_6.html#SEC34
>
> Thank you for the good pointer, yes indeed it seems it does what I
> want, which is basically:
> watch &ctx->foo;
This is equivalent to `watch ctx', since the address of ctx->foo can
only change if ctx changes. Watching an address of something is
generally not usefull.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2008-08-08 11:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 8:13 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jezlnnoh4s.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=gdb@sources.redhat.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox