From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31779 invoked by alias); 21 Oct 2006 15:06:10 -0000 Received: (qmail 31763 invoked by uid 22791); 21 Oct 2006 15:06:09 -0000 X-Spam-Check-By: sourceware.org Received: from eastrmmtao02.cox.net (HELO eastrmmtao02.cox.net) (68.230.240.37) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 21 Oct 2006 15:06:05 +0000 Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao02.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20061021150603.FTYQ10599.eastrmmtao02.cox.net@eastrmimpo02.cox.net>; Sat, 21 Oct 2006 11:06:03 -0400 Received: from [192.168.1.2] ([68.102.92.133]) by eastrmimpo02.cox.net with bizsmtp id d35Q1V00K2seT0L0000000 Sat, 21 Oct 2006 11:05:25 -0400 Message-ID: <453A3758.5090602@wichita.edu> Date: Sat, 21 Oct 2006 15:06:00 -0000 From: "Rodney M. Bates" User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050322) MIME-Version: 1.0 To: Eli Zaretskii CC: gdb@sourceware.org Subject: Re: breakpoint for accessing memory location References: <4537DBC6.1030807@hccnet.nl> <20061019201214.GA32332@nevyn.them.org> <4537DEDC.5000008@hccnet.nl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00174.txt.bz2 Eli Zaretskii wrote: > The beginning of that section has a better explanation: > > You can use a watchpoint to stop execution whenever the value of an > expression changes, without having to predict a particular place where > this may happen. > > What text would you suggest to have there that would have helped you > recognize that this is the feature you wanted? If you were looking > for some specific words or phrases, please tell what they are. This > will allow us to improve the manual. > > TIA > I have never had trouble understanding this sentence, although I have thought "a particular place in the code" would be even clearer. But while this subject is open, I would like to see more explanation on just what the semantics of evaluating a watchpoint expression are. An expression always is evaluated in a particular context that can affect the legality/result, but in the case of a watchpoint, execution is proceeding and changing the context. I have never been sure what the rules are. For example, I sometimes want to watch p->f, where p is local variable that I know perfectly well will soon cease to exist, but I also know *p will remain. I've long since learned that watching p->f doesn't work. Instead, I print the address of p->f and then watch the contents of that address. But more information on the general rules would be helpful in the manual. -- ------------------------------------------------------------- Rodney M. Bates, retired assistant professor Dept. of Computer Science, Wichita State University Wichita, KS 67260-0083 316-978-3922 rodney.bates@wichita.edu