From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17204 invoked by alias); 8 Aug 2008 12:48:37 -0000 Received: (qmail 17187 invoked by uid 22791); 8 Aug 2008 12:48:37 -0000 X-Spam-Check-By: sourceware.org Received: from ns2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 12:47:56 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id ABAE945F90; Fri, 8 Aug 2008 14:47:53 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: gdb@sourceware.org, gdb@sources.redhat.com Subject: Re: How to watch for changes in a location of memory References: <20080808081041.GA32701@geppetto> <20080808091156.GA8935@geppetto> X-Yow: .. the HIGHWAY is made out of LIME JELLO and my HONDA is a barbequed OYSTER! Yum! Date: Sat, 09 Aug 2008 12:20:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Fri, 08 Aug 2008 15:40:09 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00153.txt.bz2 Eli Zaretskii writes: >> From: Andreas Schwab >> Cc: gdb Mailing List >> Date: Fri, 08 Aug 2008 13:55:47 +0200 >> >> Stefano Sabatini writes: >> >> > 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. > > And "watch ctx" is also not generally useful, because most platforms > cannot watch large structures. In this example, ctx is a pointer (otherwise ctx->foo wouldn't work), which is small enough on all platforms. 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." From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17208 invoked by alias); 8 Aug 2008 12:48:38 -0000 Received: (qmail 17197 invoked by uid 22791); 8 Aug 2008 12:48:37 -0000 X-Spam-Check-By: sourceware.org Received: from ns2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 12:47:56 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id ABAE945F90; Fri, 8 Aug 2008 14:47:53 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Cc: gdb@sourceware.org, gdb@sources.redhat.com Subject: Re: How to watch for changes in a location of memory References: <20080808081041.GA32701@geppetto> <20080808091156.GA8935@geppetto> X-Yow: .. the HIGHWAY is made out of LIME JELLO and my HONDA is a barbequed OYSTER! Yum! Date: Sat, 09 Aug 2008 13:49:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Fri, 08 Aug 2008 15:40:09 +0300") Message-ID: User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00154.txt.bz2 Message-ID: <20080809134900.tnHUA5qan4bJd8kD1YhCQA_wLhqwE-GgQDpemCEeQY0@z> Eli Zaretskii writes: >> From: Andreas Schwab >> Cc: gdb Mailing List >> Date: Fri, 08 Aug 2008 13:55:47 +0200 >> >> Stefano Sabatini writes: >> >> > 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. > > And "watch ctx" is also not generally useful, because most platforms > cannot watch large structures. In this example, ctx is a pointer (otherwise ctx->foo wouldn't work), which is small enough on all platforms. 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."